Q.1.
Which of the following pairs have DIFFERENT expressive power?
Q.2.
In multi-programmed systems, it is advantageous if some programs such as editors and compilers can be shared by several users. Which of the following must be true of multi-programmed systems in order that a single copy of a program can be shared by several users? I. The program is a macro II. The program is recursive III.The program is reentrant
Q.3.
Consider the following expressionu*v+a-b*c Which one of the following corresponds to a static single assignment from the above expressions
Q.4.
Which of the following macros can put a micro assembler into an infinite loop?(i) .MACRO M1 X.IF EQ, X ;if X=0 thenM1 X + 1.ENDC.IF NE X ;IF X≠0 then.WORD X ;address (X) is storedhere.ENDC.ENDM(ii).MACRO M2 X.IF EQ XM2 X.ENDC.IF NE, X.WORD X+1.ENDC.ENDM
Q.5.
The expression (a*b)* c op........ where 'op' is one of '+', '*' and '↑' (exponentiation) can be evaluated on a CPU with a single register without storing the value of (a * b) if
Q.6.
A language L allows declaration of arrays whose sizes are not known during compilation. It is required to make efficient use of memory. Which of the following is true?
Q.7.
A linker reads four modules whose lengths areandwords respectively. If they are loaded in that order, what are the relocation constants?
Q.8.
Consider the following C code segment.for (i =i
Q.9.
Incremental-Compiler is a compiler
Q.10.
Shift-Reduce parsers perform the following:
Q.11.
Which is True about SR and RR-conflict:
Q.12.
Consider the following grammars(S:A --> aBCDB --> bc|cC --> d|∈D -> b(S:A --> aBCDB --> bc|∈C --> d|cD -> b(S:A --> aBCDB --> bc|∈C --> d|∈D -> b(S:A --> aBCDB --> bc|cC --> d|cD -> bWhich of the following grammar has same follow set for variable B?
Q.13.
The grammar whose productions are → if id then → if id then else → id := idis ambiguous becausea) the sentence if a then if b then c:= d has two parse treesb) the left most and right most derivations of the sentence if a then if b then c:= d give rise to different parse treesc) the sentence if a then if b then c:= d else c:= f has more than two parse treesd) the sentence if a then if b then c:= d else c:= f has two parse trees
Q.14.
Which of the following is essential for converting an infix expression to the postfix from efficiently?
Q.15.
Consider the following expression grammar. The seman-tic rules for expressioncalculation are stated next to each grammar production.E → number E.val = number. val | E '+' E E(1).val = E(2).val + E(3).val | E '×' E E(1).val = E(2).val × E(3).valThe above grammar and the semantic rules are fed to a yacc tool (which is an LALR (1)parser generator) for parsing and evaluating arithmetic expressions. Which one of thefollowing is true about the action of yacc for the given grammar?
Q.16.
Consider the grammar S → (S) | a Let the number of states in SLR(1), LR(and LALR(parsers for the grammar be nn2 and n3 respectively. The following relationship holds good
Q.17.
Debugger is a program that
Q.18.
From the given data below : a b b a a b b a a b which one of the following is not aword in the dictionary created by LZ-coding (the initial words are a, b)?
Q.19.
Consider the following statements related to compiler construction : I. Lexical Analysis is specified by context-free grammars and implemented by pushdown automata. II. Syntax Analysis is specified by regular expressions and implemented by finite-state machine. Which of the above statement(s) is/are correct?
Q.20.
Consider the following statements:(I) The output of a lexical analyzer is groups of characters.(II) Total number of tokens in printf("i=%d, &i=%x", i, &i); are 11.(III) Symbol table can be implementation by using array and hash table but not tree.Which of the following statement(s) is/are correct?