1
GATE CSE 2018
+2
-0.6
A lexical analyzer uses the following patterns to recognize three tokens $${T_1},{T_2},$$ and $${T_3}$$ over the alphabet $$\left\{ {a,b,c} \right\}.$$

\eqalign{ & {T_1}:\,\,\,a?{\left( {b|c} \right)^ * }a \cr & {T_2}:\,\,\,b?{\left( {a|c} \right)^ * }b \cr & {T_3}:\,\,\,c?{\left( {b|a} \right)^ * }c \cr}

Note that $$'x?'$$ means $$0$$ or $$1$$ occurrence of the symbol $$x.$$ Note also that the analyzer outputs the token that matches the longest possible prefix.

If the string $$bbaacabc$$ is processed by the analyzer, which one of the following is the sequence of tokens it outputs?

A
$${T_1}{T_2}{T_3}$$
B
$${T_1}{T_1}{T_3}$$
C
$${T_2}{T_1}{T_3}$$
D
$${T_3}{T_3}$$
2
GATE CSE 2016 Set 2
+2
-0.6
Which one of the following grammars is free from $$left$$ $$recursion$$?
A
\eqalign{ & S\,\, \to \,\,AB \cr & A\,\, \to \,\,Aa\,\,|\,\,b \cr & B \to c \cr}
B
\eqalign{ & S\,\, \to \,\,AB\,\,|\,\,Bb\,\,|\,\,c \cr & A\,\, \to \,\,Bd\,\,|\,\,\varepsilon \cr & B \to e \cr}
C
\eqalign{ & S\,\, \to \,\,Aa\,\,|\,\,B\,\,|\,\, \cr & A\,\, \to \,\,Bd\,\,|\,\,Sc\,\,|\,\,\varepsilon \cr & B \to d \cr}
D
\eqalign{ & S\,\, \to \,\,Aa\,\,|\,\,Bb\,\,|\,\,c \cr & A\,\, \to \,\,Bd\,\,|\,\,\varepsilon \cr & B \to Ae\,\,|\,\,\varepsilon \cr}
3
GATE CSE 2008
+2
-0.6
Which of the following are true?

I. A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage allocation

II. Multi-level access link (or display) arrangement is needed to arrange activation records only if the programming language being implemented has nesting of procedures/functions

III. Recursion in programming languages cannot be implemented with dynamic storage allocation

IV. Nesting procedures/functions and recursion require a dynamic heap allocation scheme and cannot be implemented with a stack-based allocation scheme for activation records

V. Programming languages which permit a function to return a function as its result cannot be implemented with a stack-based storage allocation scheme for activation records

A
II only
B
I, III and IV only
C
I, II and V only
D
II, III and V only
4
GATE CSE 1999
+2
-0.6
The number of tokens in the Fortran statement DO 10 I = 1.25 is
A
3
B
4
C
5
D
None of the above
GATE CSE Subjects
EXAM MAP
Medical
NEET