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
Consider the grammar with the following translation rules and as the start symbol …
Consider a program that consists of two source modules and contained in two different files. If contains a reference to a function defined in the reference will be resolved at
Which of the following grammar rules violate the requirements of an operator grammar? are nonterminals, and are terminals.
Consider the following function void swap(int a, int b) { int temp; temp = a; a = b; b = temp; } In order to exchange the values of two variables and .
The following program fragment is written in a programming language that allows global variables and does not allow nested declarations of functions. global int i=100, j=5; void P(x) { int i=10; print(x+10); i=200; j=20; print (x); } main() {P(i+j);} If the programming language uses dynamic scoping and call by name parameter passing mechanism, the values …
Which of the following is NOT an advantage of using shared, dynamically linked libraries as opposed to using statistically linked libraries?
Consider the syntax directed definition shown below. …
Consider the translation scheme shown below. num (num.val) Here num is a token that represents an integer and num.val represents the corresponding integer value. For an input string ‘’, this translation scheme will …
Consider the grammar shown below. This grammar is
Assume that the SLR parser for a grammar G has states and the LALR parser for G has states. The relationship between and is
In a bottom-up evaluation of a syntax directed definition, inherited attributes can
Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?
Dynamic linking can cause security concerns because
To evaluate an expression without any embedded function calls
Which of the following statements is false?
The process of assigning load addresses to the various parts of the program and adjusting the code and the data in the program to reflect the assigned addresses is called
Given the following expression grammar: Which of the following is true?
Which of the following derivations does a top-down parser use while parsing an input string? The input is scanned from left to right.
The number of tokens in the following C statement is printf("i=%d, &i=%x", i, &i);
A grammar that is both left and right recursive for a non-terminal, is
