Time Left - 12:00 mins
Compiler Design : Nuclear Quiz 2
Attempt now to get your rank among 332 students!
Question 1
Consider the following program
1: main()
2: { int x=10;
3: if(x<20;
4: else
5: y=20;
6: }
When lexical analyser scanning the above program, find the line number where the l lexical error can be produced?
1: main()
2: { int x=10;
3: if(x<20;
4: else
5: y=20;
6: }
When lexical analyser scanning the above program, find the line number where the l lexical error can be produced?
Question 2
The Bottom-up parser uses?
Question 3
A grammar that produces more than one parse tree for some sentence is called?
Question 4
Consider the following grammar :
S → (L)/a
L → SL'
L' → / ,SL'
Check whether the grammar is LL(1). If it is LL(1), then find the size of the LL(1) parsing table.
Question 5
For the grammar below, a partial LL(1) parsing table is also presented along with the grammar. Entries that need to be filled are indicated as E1, E2, and E3.
Question 6
The optimization phase in a compiler generally:
Question 7
Which of the following is not a machine-independent code optimization technique?
Question 8
DAG:
Question 9
It involves folding the constants:
Question 10
An intermediate code can be represented as:
- 332 attempts
- 0 upvotes
- 1 comment
Aug 8GATE & PSU CS