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

GATE 2011

81 questions

MCQ 811-mark 40 · 2-mark 41

Questions 41–45 of 81

Q41Lexical Analysis1 markMCQ−0.33 if wrong
The lexical analysis for a modern computer language such as Java needs the power of which one of the following machine models in a necessary and sufficient sense?

Q42Lexical Analysis1 markMCQ−0.33 if wrong
In a compiler, keywords of a language are recognized during

Q43Parsing2 marksMCQ−0.67 if wrong
Consider two binary operators '↑\uparrow 'and '↓\downarrow' with the precedence of operator ↓\downarrow being lower than that of the operator ↑\uparrow . Operator ↑\uparrow is right associative while operator ↓\downarrow is left associative. Which one of the following represents the parse tree for expression (7 ↓\downarrow 3 ↑\uparrow4 ↑\uparrow 3 ↓\downarrow2)?
(A) (C) (B) (D) ↓ ↑ ↑ ↓ 7 3 4 3 2 ↓ ↓ ↑ ↑ 2 7 3 4 3 ↓ ↓ ↑ ↑ 7 2 3 3 4 ↓ ↑ ↑ ↓ 2 3 4 7 3

Q44Intermediate Code Generation2 marksMCQ−0.67 if wrong
Consider evaluating the following expression tree on a machine with load-store architecture in which memory can be accessed only through load and store instructions. The variables a, b, c, d and e are initially stored in memory. The binary operators used in this expression tree can be evaluated by the machine only when the operands are in registers. The instructions produce result only in a register. If no intermediate results can be stored in memory, what is the minimum number of registers needed to evaluate this expression?
+--abe+cd

Q45Thread1 markMCQ−0.33 if wrong
A thread is usually defined as a 'light weight process' because an operating system (OS) maintains smaller data structures for a thread than for a process. In relation to this, which of the followings is TRUE?