Compiler Design Quiz Test-1 - Question - Paper
Compiler Design Quiz Test-1 - Question - Paper
Option C : {w?w is a string that does not contain exactly two 0's}
Option D : {w?w is a string that does not contain more than four 0's}
What is the DFA for the language {w?w starts with a and has at most one b}?
i) ii) iii)
iv)
Option A : i)
Option B : ii)
Option C : iii)
Option D : iv)
Option A : {a, +, $}
Option B : {+, $}
Option C : {+, $, )}
Option D : {+, )}
Option D : ambiguity
Question 6: [Mark : 1] [-ve Mark : 0]
Option A : A
Option B : B
Option C : C
Option D : D
Option A : {b, c}
Option B : {a, b}
Option C : {a, b, c}
Option D : {a, b, c, ?}
(iv) In case of string derivation, it starts from the string and proceed untill the start symbol is derived.
Option A : { h , g , $ }
Option B : { g , $ , b , h }
Option C : { $ , a , h , g }
Option D : { g , $ , h, ?}
Option B : M[C,y]
Option C : M[B,y]
Option D : M[B,x]
Option A : A
Option B : B
Option C : C
Option D : D
Suppose there is a compiler for C language hat can generate code for computer A. Which of the
following statement is true?
Option C : It can be used only for computers with similar processor and operating system
Option D : It can be used only for computers with similar processor, operating system and peripherals
Which of the following data structure may be good if there are frequent search for data items followed
by insertion and deletion?
Option A : Stack
Option B : Array
Option C : Tree
Option A : Lexical
Option B : Syntax
A programming language does not allow integer division operation. This is generally detected in the
phase of _____.
Option A : Lexical
Option B : Syntax
Option C : Semantic
Option A : Divisible by 2
Option B : Divisible by 3
Option C : Divisible by 4
A regular expression for accepting strings with number of 1's are twice as of number of 0’s is
Option A : (11+0)*
Option B : (0|1)*1(0|1)*|1(0|1)*
Option C : 0*(11)*+(11)*0
Option A : 24
Option B : 27
Option C : 25
Option D : 28
A compiler that runs on one machine and produces code for a different machine is called
Let L1={0} and L2=?. Which of the following is the language L1L2*?L1*
Option A : {?}
Option B : {?,0}
Option C : ?
Option D : 0*
A Compiler is defined as