Skip to content

GATE CS Compiler Design questions

Practise Compiler Design questions for GATE CS. Explore official PYQs and original subject-wise quizzes, check answers and view available solutions. Free, no sign-in.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

20 on this page
Official PYQ1994Compiler DesignLexical AnalysisNAT · 1 mark
State whether the following statements are True or False with reasons for your answer A symbol declared as ‘external’ in an assembly language program is assigned an address outside the program by the assembler itself.
Official PYQ1994Compiler DesignLexical AnalysisNAT · 1 mark
State whether the following statements are True or False with reasons for your answer: Coroutine is just another name for a subroutine.
Official PYQ1994Compiler DesignLexical AnalysisNAT · 1 mark
State whether the following statements are True or False with reasons for your answer A subroutine cannot always be used to replace a macro in an assembly language program.
Official PYQ1994Compiler DesignParsing (LL, LR)MCQ · 1 mark
Which of the following features cannot be captured by context-free grammars?
Official PYQ1994Compiler DesignIntermediate Code GenerationMCQ · 1 mark
Generation of intermediate code based on an abstract machine model is useful in compilers because
Official PYQ1993Compiler DesignRuntime EnvironmentsMCQ · 1 mark
A part of the system software which under all circumstances must reside in the main memory is:
Official PYQ1993Compiler DesignLexical AnalysisMSQ · 1 mark
A simple two-pass assembler does the following in the first pass:
Official PYQ1992Compiler DesignParsing (LL, LR)MCQ · 1 mark
If GG is a context free grammar and ww is a string of length ll in L(G)L(G), how long is a derivation of ww in GG, if GG is in Chomsky normal form?
Official PYQ1992Compiler DesignParsing (LL, LR)MSQ · 1 mark
Consider the SLR(1)\text{SLR(1)} and LALR (1)\text{LALR (1)} parsing tables for a context free grammar. Which of the following statement is/are true?
Official PYQ1992Compiler DesignParsing (LL, LR)MSQ · 1 mark
For a context free grammar, FOLLOW(A) is the set of terminals that can appear immediately to the right of non-terminal AA in some "sentential" form. We define two sets LFOLLOW(A) and RFOLLOW(A) by replacing the word "sentential" by "left sentential" and "right most sentential" respectively in the definition of FOLLOW (A).
Official PYQ1991Compiler DesignRuntime EnvironmentsMSQ · 1 mark
Indicate all the true statements from the following:
Official PYQ1991Compiler DesignRuntime EnvironmentsMCQ · 1 mark
A “link editor” is a program that:
Official PYQ1990Compiler DesignRuntime EnvironmentsNAT · 1 mark
State whether the following statements are TRUE or FALSE with reason: The Link-load-and-go loading scheme required less storage space than the link-and-go loading scheme.
Official PYQ1989Compiler DesignRuntime EnvironmentsMSQ · 1 mark
In which of the following case(s) is it possible to obtain different results for call-by-reference and call-by-name parameter passing?
Official PYQ1988Compiler DesignRuntime EnvironmentsNAT · 1 mark
What is printed by following program, assuming call-by reference method of passing parameters for all variables in the parameter list of procedure P? program Main(inout, output); var a, b:integer; procedure P(x, y, z:integer); begin y:=y+1 z:=x+x end P; begin a:=2; b:=3; p(a+b, a, a); Write(a) end.
Official PYQ1987Compiler DesignRuntime EnvironmentsMCQ · 1 mark
For the program given below what will be printed by the write statements marked (1)(1) and (2)(2) in the program if the variables are dynamically scoped? Var x, y:interger; procedure P(n:interger); begin x := (n+2)/(n-3); end; procedure Q Var x, y:interger; begin x:=3; y:=4; P(y); Write(x); __(1) end; begin x:=7; y:=8; Q; Write(x); __(2) end.
Official PYQ1987Compiler DesignRuntime EnvironmentsMCQ · 1 mark
Study the following program written in a block-structured language: Var x, y:interger; procedure P(n:interger); begin x:=(n+2)/(n-3); end; procedure Q Var x, y:interger; begin x:=3; y:=4; P(y); Write(x) __(1) end; begin x:=7; y:=8; Q; Write(x); __(2) end. What will be printed by the write statements marked (1)(1) and (2)(2) in the program if the variables …
Official PYQ1987Compiler DesignLexical AnalysisMCQ · 1 mark
Using longer identifiers in a program will necessarily lead to:
Official PYQ1987Compiler DesignParsing (LL, LR)MCQ · 1 mark
An operator precedence parser is a
Official PYQ1987Compiler DesignParsing (LL, LR)MCQ · 1 mark
A context-free grammar is ambiguous if: