Question 31
I. Canonical LR is more powerful than SLR. II. SLR is more powerful than LALR. III. SLR is more powerful than canonical LR.
Question 32
Question 33
Question 34
I. Program Counter II. Stack III. Address space IV. Registers
Question 35
void printxy(int x, int y) { int *ptr; x = 0; ptr = &x; y = *ptr; *ptr = 1; printf("%d,%d", x, y); }The output of the printxy(1,1) is
Question 36
Question 37
Question 38
while(r >= y) { r = r - y; q = q + 1; }Which of the following conditions on the variables x, y, q and r before the execution of the fragment will ensure that the loop terminates in a state satisfying the condition x == (y*q + r)?
Question 39
Question 40
E -> E - T | T T -> T + F | F F -> (E) | idWhich of the following grammars are not left recursive, but equivalent to G.
A) E -> E - T | T T -> T + F | F F -> (E) | id B) E -> TE\' E\' -> -TE\' | ε T -> T + F | F F -> (E) | id C) E -> TX X -> -TX | ε T -> FY Y -> +FY | ε F -> (E) | id D) E -> TX | (TX) X -> -TX | +TX | ε T -> id
There are 65 questions to complete.