Time Left - 10:00 mins

GATE 2020 : Compiler Quiz 1

Attempt now to get your rank among 477 students!

Question 1

Which of the following statement are correct-
S1- Lexical analysis phase is responsible for eliminating void space character.
S2- Semantic analyzer help in giving error message by giving row no and column no.

Question 2

How many tokens are generated by the lexical analyzer, if the following program has no lexical error?
main()
{
int x,y;
fl/* gate oat z; */
/*x=exam*/10;
y=20;
}

Question 3

Consider the following expression of C program.
abcd + ( 2 - 5 += 6/2--;
How many tokens are generated by the above expression during lexical analysis?

Question 4

Consider the C program
Main()
{
int x = 10;
x = x + y + z;
}
How many tokens are identified by lexical analyzer?

Question 5

In C programming, which of the following is not used as a token separator during lexical analysis?

Question 6

The number of tokens in the following C statement
printf(“i=PERCENTAGE-TAG---d, &i=PERCENTAGE-TAG---x”,i,&i); is
  • 477 attempts
  • 2 upvotes
  • 4 comments
Sep 26GATE & PSU CS