Q.No. 4 - TOC gate2020:
Which of the following is the correct order of execution of the above steps?
A 2,1,4,5,3
B 1,2,4,3,5
C 3,5,2,1,4
D 3,5,1,2,4
ANS: C. 3,5,2,1,4
Q. No. 7-toc-2020: Which one of the following regular expressions represents the set of all binary Strings with an odd number of 1*s?
A. ((0+1)*1(0+1)*1)*10*
B. (0*10*10*)*0*1
C. 10*(0*10*10*)*
D. (0*10*10*)*10*
Ans: (D) (0*10*10*)*10*
Q. No. 8-toc-2020: Consider the following statements.
I. if L1 U L2 is regular, then both L1 and L2 must be regular.
II. The class of regular languages is closed under infinite union.
Which of the above statements is /are TRUE?
A. I only
B. II only
C. Both I and II
D. Neither I nor II.
Ans: (D) Neither I nor II.
Q. No. 9-TOC-2020: Consider the following statements.
I) Symbol table is accessed only during lexical analysis and syntax analysis.
II) for programming language thatsupport recursion necessarily need heap storage for memory allocation in the run-time environment.
III) Errors violating the condition ‘any variable must be declared before its use’
Are detected during syntax analysis.
Which of the above statement is /are TRUE?
A) I only
B) I and III only
C) II only
D) None of I, II, and III
Ans: D None of I, II, and III
Q.No.10-TOC-2020: Consider the language
L={an | n≥ 0} U{anbn |n ≥ 0} and the following statements.
I) L is deterministic context-free.
II) L is context-free but not deterministic context-free.
III) L is not LL(k) for any k.
Which of the above statements is /are TRUE?
A) I only
B) II only
C) I and III only
D) III only
Ans: C. I and III only
0 Comments