Time Left - 15:00 mins
GATE CS 2021 : Compiler design Quiz 2
Attempt now to get your rank among 778 students!
Question 1
Type checking is normally done during
Question 2
Consider the C program
Main()
{
int x = 10;
x = x + y + z;
}
How many tokens are identified by lexical analyzer?
Main()
{
int x = 10;
x = x + y + z;
}
How many tokens are identified by lexical analyzer?
Question 3
The number of tokens in the following C statement
printf(“i=PERCENTAGE-TAG---d, &i=PERCENTAGE-TAG---x”,i,&i); is
printf(“i=PERCENTAGE-TAG---d, &i=PERCENTAGE-TAG---x”,i,&i); is
Question 4
Which of the following statement is correct-
S1- Lexical analysis phase is responsible for eliminating void space character.
S2- Semantic analyzer help in giving error message by giving row number and column number.
S1- Lexical analysis phase is responsible for eliminating void space character.
S2- Semantic analyzer help in giving error message by giving row number and column number.
Question 5
Consider the grammar
E → TE’
E’ → +TE’ | €
T → FT’
T’ → *FT’ | €
F → (E) | id
(E) will be same as that of
Question 6
Considering the following grammar
S → iEtS |iEtSeS|a
E → b
Then after left factoring we get _________
- 778 attempts
- 2 upvotes
- 9 comments
Oct 12GATE & PSU CS