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

GATE 2010

82 questions

MCQ 821-mark 39 · 2-mark 43

Questions 41–45 of 82

Q41Recursive Language1 markMCQ−0.33 if wrong
Let L1 be a recursive language. Let L2 and L3 be languages that are recursively enumerable but not recursive. Which of the following statements is not necessarily true?

Q42Lexical Analysis1 markMCQ−0.33 if wrong
Which data structure in a compiler is used for managing information about variables and their attributes?

Q43Parsing2 marksMCQ−0.67 if wrong
The grammar S→\rightarrowaSa|bS|c is

Q44Runtime Environment1 markMCQ−0.33 if wrong
Which languages necessarily need heap allocation in the runtime environment?

Q45Intermediate Code Generation2 marksMCQ−0.67 if wrong
The program below uses six temporary variables a, b, c, d, e, f.

a =1
b= 10
c =20
d= a +b
e= c +d
f =c +e
b= c+ e
e =b +f
d =5 +e
return d +f

Assuming that all operations take their operands from registers, what is the minimum number of registers needed to execute this program without spilling?