Skip to content
Early access — you're among the first to try PYQLabs. Share feedback

Lexical Analysis

GATE CSE & IT · 12 questions across 10 years (1988-2026) · 25% recurrence rate

Recurrence sparkline

19882026
198820072026

Difficulty mix

easy 67%
med 33%

Question types

MCQ8
MTF3
NAT1

All 12 questions on Lexical Analysis

2026 PYQ

Consider the following C statements: char str1 = "Hello; / Statement S1 */ char str2 = "Hello;"; / Statement S2 */ int str3 = "Hello"; / Statement S3 */ Which of the following options is/are correct?

Easy
2026 PYQ

A lexical analyzer uses the following token definitions letter → [A - Za - z] digit → [0-9] id → letter (letter $\mid$ digit)* number → digit $^{+}$ ws → (blank | tab | newline) ${ }^{+}$ For the string given below, $x1...

Med
2018 PYQ

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}:...

Med
2016 PYQ

Match the following: GROUP - 1 GROUP - 2 (P) Lexical analysis (i) Leftmost derivation (Q) Top down parsing (ii) Type checking (R) Semantic analysis (iii) Regular expressions (S) Runtime environments (iv) Activation recor...

Easy
2011 PYQ

In a compiler, keywords of a language are recognized during

Easy
2009 PYQ

Match all items in Group 1 with correct options from those given in Group 2. Group 1 P. Regular expression Q. Pushdown automata R. Dataflow analysis S. Register allocation Group 2 1. Syntax analysis 2. Code generation 3....

Easy
2000 PYQ

The number of tokens in the following C statement is: printf("i = %d, &i = %x",i, &i);

Easy
1999 PYQ

The number of tokens in the Fortran statement DO 10 I = 1.25 is

Med
1995 PYQ

Which of the following strings can definitely be said to be tokens without looking at the next input character while compiling a Pascal program? I. begin II. program III. <>

Med
1995 PYQ

In some programming languages, an identifier is permitted to be a letter following by any number of letters or digits. If L and D denote the sets of letters and digits respectively, which of the following expressions def...

Easy
1990 PYQ

Match the following: List - I (a) Lexical Analysis (b) Code Optimization (c) Code Generation (d) Abelian Group List - II (p) DAG's (q) Syntax trees (r) Push Down automata (s) Finite automata

Easy
1988 PYQ

In a compiler the module that checks every character of the source text is called:

Easy