1. Which among the following can be an annihilator for multiplication operation?
a. 0
b. 1
c. 100
d. 22
Ans- a. 0
2. Statement: If we take the union of two identical expression, we can replace them by one copy of the expression. Which of the following is a correct option for the given statement?
a. Absorption Law
b. Idempotent Law
c. Closure Law
d. Commutative Law
Ans- b. Idempotent Law
3. The given regular language corresponds to which of the given regular language: e+1+(1+0)*0+(0+1)*11
a. The language of all strings that end with 11 or 00
b. The language of all strings that end with 0 or 1
c. The language of all strings which does not end with 01
d. None of the mentioned
Ans- c. The language of all strings which does not end with 01
4. The minimum number of 1's to be used in a regular expression of the given language: R(x): The language of all strings containing exactly 2 zeroes.
a. 2
b. 3
c. 0
d. 1
Ans- b. 3
5. Which of the following regular expression is equivalent to R(1,0)? R(1,0)={111*}*
a. (11+111)*
b. (111+1111)*
c. (111+11*)*
d. All of the mentioned
Ans- a. (11+111)*
6. The minimum length of a string {0,1}* not in the language corresponding to the given regular expression: (0*+1*)(0*+1*)(0*+1*)
a. 3
b. 4
c. 5
d. 6
Ans- b. 4
7. The phase of compilation which involves type checking is:
a. Parsing
b. Scanning
c. Syntax directed translation
d. Semantic Analyzer
Ans- c. Syntax directed translation
8. The scanner outputs:
a. Stream of tokens
b. Image file
c. Intermediate code
d. Machine code
Ans- a. Stream of tokens
9. Which of the following is the task of lexical analysis?
a. To build the uniform symbol table
b. To initialize the variables
c. To organize the variables in a lexical order
d. None of the mentioned
Ans- a. To build the uniform symbol table
10. The action of parsing the source code into proper syntactic classes is known as:
a. Parsing
b. Interpretation analysis
c. Lexicography
d. Lexical Analysis
Ans- d. Lexical Analysis