GATE 2000 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2000

54 questions

MCQ 541-mark 54

Questions 41–45 of 54

Q41Context Free Language1 markMCQ−0.33 if wrong
Let L denote the languages generated by the grammar S→0S0∣00S \to 0S0 \mid 00. Which of the following is TRUE?

Q42Lexical Analysis1 markMCQ−0.33 if wrong
The number of tokens in the following C statement is
 printf("i=%d, &i=%x", i, &i);

Q43Parsing1 markMCQ−0.33 if wrong
Given the following expression grammar:

E→E∗F∣F+E∣FF→F−F∣id\begin{array}{l} E \to E * F \mid F + E \mid F \\ F \to F - F \mid id \end{array}

Which of the following is true?

Q44Parsing1 markMCQ−0.33 if wrong
Which of the following derivations does a top-down parser use while parsing an input string? The input is scanned from left to right.

Q45Process1 markMCQ−0.33 if wrong
Which of the following need not necessarily be saved on a context switch between processes?