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

GATE 2008

185 questions

MCQ 1851-mark 52 · 2-mark 133

Questions 131–135 of 185

Q131Undecidability1 markMCQ−0.33 if wrong
Which of the following are decidable?

I. Whether the intersection of two regular languages is infinite
II. Whether a given context-free language is regular
III. Whether two push-down automata accept the same language
IV. Whether a given grammar is context-free

Q132Parsing2 marksMCQ−0.67 if wrong
An LALR(1) parser for a grammar G can have shift-reduce (S-R) conflicts if and only if

Q133Parsing2 marksMCQ−0.67 if wrong
Match the following:
E. Checkingthatidentifiersare declared before their use F. Numberofformalparametersin thedeclarationofafunction agreeswiththenumberofactual parameters in use of that function G. Arithmeticexpressionswith matched pairs of parentheses H. Palindromes P. Q. R. S. L ={ anbmcndm n ≥ 1, m ≥ 1 } X → XbXXcXdXfg L ={wcww(ab) *} X → bXbcXcε

Q134Parsing1 markMCQ−0.33 if wrong
Which of the following describes a handle (as applicable to LR-parsing) appropriately?

Q135Runtime Environment2 marksMCQ−0.67 if wrong
Which of the following are true?

I. A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage allocation

II. Multi-level access link (or display) arrangement is needed to arrange activation records only if the programming language being implemented has nesting of procedures/functions

III. Recursion in programming languages cannot be implemented with dynamic storage allocation

IV. Nesting procedures/functions and recursion require a dynamic heap allocation scheme and cannot be implemented with a stack-based allocation scheme for activation records

V. Programming languages which permit a function to return a function as its result cannot be implemented with a stack-based storage allocation scheme for activation records