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
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.
State whether the following statements are True or False with reasons for your answer: Coroutine is just another name for a subroutine.
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.
Which of the following features cannot be captured by context-free grammars?
Generation of intermediate code based on an abstract machine model is useful in compilers because
A part of the system software which under all circumstances must reside in the main memory is:
A simple two-pass assembler does the following in the first pass:
If is a context free grammar and is a string of length in , how long is a derivation of in , if is in Chomsky normal form?
Consider the and parsing tables for a context free grammar. Which of the following statement is/are true?
For a context free grammar, FOLLOW(A) is the set of terminals that can appear immediately to the right of non-terminal 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).
Indicate all the true statements from the following:
A “link editor” is a program that:
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.
In which of the following case(s) is it possible to obtain different results for call-by-reference and call-by-name parameter passing?
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.
For the program given below what will be printed by the write statements marked and 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.
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 and in the program if the variables …
Using longer identifiers in a program will necessarily lead to:
An operator precedence parser is a
A context-free grammar is ambiguous if:
