GATE Compiler Design Full Mock Test SET-1

Questions 1-5 of 100

0% completed (0/100 answered)
Your score 0/100 0 answered
Correct 0 Incorrect 0 Unanswered 100 Accuracy 0%

Question 1

MCQ · Single Correct 1 mark

How many tokens are in the C code fragment: int x = a + b * 5;?

Answers for question 1

Question 2

MCQ · Single Correct 1 mark

Which phase of a compiler reads source code character-by-character and groups them into meaningful sequences called lexemes?

Answers for question 2

Question 3

MCQ · Single Correct 1 mark

Which formal language model is used by lexical analyzer generators like LEX/FLEX to recognize tokens?

Answers for question 3

Question 4

MCQ · Single Correct 1 mark

How many tokens are present in the code fragment for(i=0; i<10; i++)?

Answers for question 4

Question 5

MCQ · Single Correct 1 mark

What token matching rule does a lexical analyzer use when both if and if_var can match the input if_var?

Answers for question 5
Scroll to Top