Forum

CS606 Quiz 2 Soluti...
 
Notifications
Clear all

CS606 Quiz 2 Solution


admin
Posts: 978
Admin
Topic starter
(@shahzain)
Member
Joined: 2 years ago

 

1) Consider the following grammar:

A→aBD h

B→cC

C→bC / e

D→EF

E→ g / e

F →f / e

  1. f. e
  2. c
  3. e
  4. a

 

2) Parser that capitalizes on the LL (1) property are called ___________

  1. Predicative parser
  2. Middle parser
  3. Bottom-up parser
  4. Non-predictive parser

 

3) If there are syntax errors in the program, the __________ will detect and reports them accordingly

  1. Parser
  2. MS Word
  3. Tokenizer
  4. Scanner

 

4) Bottom-up parser can handle _________ class of grammars

  1. Tiny
  2. Medium
  3. Large
  4. Small

 

5) The predicative parser uses an ________stack to keep track of pending non-terminals

  1. Infinite
  2. Unlimited
  3. Implicit
  4. Explicit

 

6) A ______________ parser operate by repeatedly locating handles on the frontier of the partial parse tree performing reductions that they specify

  1. Top-Down
  2. Bottom-up
  3. Predictive
  4. Descent parsing

 

7) The syntax of C and C++ is derived heavily from _____________

  1. Fortran
  2. Algol-60
  3. Java
  4. Pascal

 

8) Consider the following grammar:

A→aBD h

B→cC

C→bC / e

D→EF

E→ g / e

F →f / e

  1. h
  2. $
  3. f. h
  4. h

 

9) Register allocation by graph coloring uses a register interferences graph _______ nodes in the graph are joined by ana edge when the live ranges of the values they represent overlap.

  1. Three
  2. Four
  3. Five
  4. Two

 

10) Following statement represents

if x relop y goto L

  1. While Loop
  2. Abstract jump
  3. None of the given
  4. Conditional jump
Topic Tags
Share:
Scroll to Top