Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged tbb-cd-1
2
votes
2
answers
1
Test by Bikram | Compiler Design | Test 1 | Question: 30
Consider the following grammar: $S \rightarrow L = P \mid P$ $L \rightarrow ^*P \mid id$ $P \rightarrow L$ The above grammar is: Ambiguous SLR(1) LALR(1) None of the above
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
688
views
tbb-cd-1
compiler-design
grammar
3
votes
1
answer
2
Test by Bikram | Compiler Design | Test 1 | Question: 29
Which grammar causes recursive-descent parser to go into infinite loop? LL(1) Left recursive grammar Right recursive grammar Grammar with left factors
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
269
views
tbb-cd-1
compiler-design
grammar
3
votes
1
answer
3
Test by Bikram | Compiler Design | Test 1 | Question: 28
Consider the following syntax directed definition of any desk calculator: $L \rightarrow En \{ \text{print}(E.val) \}$ $E \rightarrow E1 + 1 \{ E.val = E1.val + Z.val \}$ $E \rightarrow Z E \cdot val = Z \cdot val$ ... $7 ^* 4 + 2n$? $9$ $6$ $10$ $11$
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
782
views
tbb-cd-1
compiler-design
syntax-directed-translation
2
votes
0
answers
4
Test by Bikram | Compiler Design | Test 1 | Question: 27
$\textbf{goto}$ function of LR class of grammar is represented as: Deterministic Finite Automata transitions Non-deterministic Finite Automata transitions PDA transitions Parsing table
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
470
views
tbb-cd-1
compiler-design
parsing
lr-parser
2
votes
1
answer
5
Test by Bikram | Compiler Design | Test 1 | Question: 26
In compilers, the type checking is done in: Lexical Analysis Semantic Analysis Code Generation Phase Parsing Phase
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
230
views
tbb-cd-1
compiler-design
compilation-phases
3
votes
2
answers
6
Test by Bikram | Compiler Design | Test 1 | Question: 25
Consider the following grammar: $S \rightarrow aMd \mid bNd \mid aNe \mid bMe$ $M \rightarrow c$ $N \rightarrow c$ The grammar above is: LR(1) but not LALR(1) LALR(1) but not SLR(1) SLR(1) but not LR(1) LALR(1)
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
511
views
tbb-cd-1
compiler-design
grammar
3
votes
1
answer
7
Test by Bikram | Compiler Design | Test 1 | Question: 24
Consider the following grammar: $E \rightarrow E + T \mid T$ $T \rightarrow T ^* F \mid F$ $F \rightarrow (E) \mid id$ ... $E \rightarrow TE' , \ \ T \rightarrow FT' , \ \ F \rightarrow (E) \mid id$
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
457
views
tbb-cd-1
compiler-design
parsing
ll-parser
grammar
2
votes
1
answer
8
Test by Bikram | Compiler Design | Test 1 | Question: 23
Which one of the following statements is TRUE? SLR parser has more states than LALR parser. LALR parser has more states than Canonical LR. Canonical LR has fewer states than SLR parser. Both SLR and LALR parsers have the same number of states.
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
303
views
tbb-cd-1
compiler-design
parsing
3
votes
1
answer
9
Test by Bikram | Compiler Design | Test 1 | Question: 22
The language which supports _______ needs heap allocation in the runtime environment. Dynamic Data Structure Static Scoping Global Variable Recursion
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
221
views
tbb-cd-1
compiler-design
runtime-environment
3
votes
1
answer
10
Test by Bikram | Compiler Design | Test 1 | Question: 21
Which one of the following can be handled by predictive parsers? Left recursion Left factors Ambiguity Non-determinism
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
1.0k
views
tbb-cd-1
compiler-design
parsing
3
votes
1
answer
11
Test by Bikram | Compiler Design | Test 1 | Question: 20
The least number of temporary variables required to create a $3$ address code sequence for the statement $L= P + R$ is ________.
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
794
views
tbb-cd-1
numerical-answers
compiler-design
intermediate-code
4
votes
2
answers
12
Test by Bikram | Compiler Design | Test 1 | Question: 19
Consider the following grammar: $Z \rightarrow TZ'$ $Z' \rightarrow +TZ' \mid \epsilon$ $T \rightarrow Y T '$ $T ' \rightarrow ^* YT ' \mid \epsilon$ $Y \rightarrow (Z) \mid id$ Which of the following represents Follow(Y)? $\{ ), id \}$ $\{ ), id, \$, *, + \}$ $\{ ^*, +, ), \$ \}$ $\{ +, ), \$ \}$
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
304
views
tbb-cd-1
compiler-design
parsing
grammar
3
votes
1
answer
13
Test by Bikram | Compiler Design | Test 1 | Question: 18
Assume that the SLR(1) parser for a grammar has P1 states, and the CLR(1) parser for the same has P2 states. Which of the following clearly depicts the relationship between P1 and P2? $P1 \leq P2$ $P1 = P2$ $P1 \geq P2$ It depends on the grammar.
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
284
views
tbb-cd-1
compiler-design
parsing
2
votes
1
answer
14
Test by Bikram | Compiler Design | Test 1 | Question: 17
Which one of the following statements is TRUE? SLR parser is more powerful than LALR. LALR parser is more powerful than Canonical LR. Canonical LR is more powerful than LALR parser. SLR, Canonical LR and LALR parsers have the same power.
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
192
views
tbb-cd-1
compiler-design
parsing
3
votes
1
answer
15
Test by Bikram | Compiler Design | Test 1 | Question: 16
Consider the following grammars: $S \rightarrow aS \mid Sa \mid \in$ $E \rightarrow E +E \mid E^*E \mid id$ $A \rightarrow AA \mid (A) \mid a$ $S \rightarrow SS \mid AB, \ A \rightarrow Aa \mid a, \ B \rightarrow Bb \mid b$ These grammars are: Ambiguous Unambiguous Regular Inherently Ambiguous
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
512
views
tbb-cd-1
compiler-design
grammar
2
votes
2
answers
16
Test by Bikram | Compiler Design | Test 1 | Question: 15
Which of these is NOT true about Abstract Syntax Tree (AST)? An AST is usually the result of the syntax analysis phase of a compiler. AST has no impact on the final output of the compiler. AST is a tree ... structure of source code written in a programming language. AST is also used in program analysis and program transformation systems.
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
611
views
tbb-cd-1
compiler-design
syntax-directed-translation
intermediate-code
2
votes
1
answer
17
Test by Bikram | Compiler Design | Test 1 | Question: 14
Consider the following grammar: $E' \rightarrow E$ $E \rightarrow E + Y \mid Y$ $Y \rightarrow Y ^* F \mid F$ $F \rightarrow id \mid (E)$ How many $LR(0)$ items are there in closure $(\{E' \rightarrow \cdot E\})$? $1$ $6$ $7$ $5$
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
380
views
tbb-cd-1
compiler-design
parsing
3
votes
1
answer
18
Test by Bikram | Compiler Design | Test 1 | Question: 13
Consider following Translation Scheme: $S \rightarrow ER$ $R \rightarrow ^* E \{ print \{' *' \}; \} R \mid \epsilon$ $E \rightarrow F + E \{ print ('+');\} \mid F$ $F \rightarrow S \mid id \{ print (id,value) ; \}$ Here, $id$ is a ... for an input " $1* 7 + 9$ "? $1 7* + 9$ $1 * 7 9 +$ $1 7 9 * +$ $179 + *$
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
256
views
tbb-cd-1
compiler-design
syntax-directed-translation
2
votes
2
answers
19
Test by Bikram | Compiler Design | Test 1 | Question: 12
Read the below mentioned grammar: $S \rightarrow X$ $X \rightarrow YX \mid \epsilon$ $Y \rightarrow aY \mid b$ This grammar is NOT: $LALR$ $LR (0)$ $LR(1)$ None of the above
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
413
views
tbb-cd-1
compiler-design
grammar
3
votes
1
answer
20
Test by Bikram | Compiler Design | Test 1 | Question: 11
In the construction of $LL(1)$ parsing table for the following grammar $M[S,( ] \& M [W, \$]$ are respectively $S \rightarrow XY$ $X \rightarrow (S) \mid \text{ int } W$ $Y\rightarrow +S \mid \epsilon$ $W \rightarrow ^* ... $S \rightarrow XY, \ W \rightarrow \epsilon$ $S \rightarrow YX, \ W \rightarrow \epsilon$
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
227
views
tbb-cd-1
compiler-design
parsing
3
votes
1
answer
21
Test by Bikram | Compiler Design | Test 1 | Question: 10
The grammar which has no epsilon transition or two adjacent nonterminals in the right side of any production is ___________. LL(1) grammar Unambiguous grammar Operator grammar Context Sensitive grammar
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
315
views
tbb-cd-1
compiler-design
parsing
grammar
2
votes
1
answer
22
Test by Bikram | Compiler Design | Test 1 | Question: 9
___________ parsers build parse trees starting from the root node and work down to the leaves. LR LL SLR LALR
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
202
views
tbb-cd-1
compiler-design
parsing
2
votes
2
answers
23
Test by Bikram | Compiler Design | Test 1 | Question: 8
Read the following grammar: $S \rightarrow Ka \mid bKc \mid dc \mid bda$ $K \rightarrow d$ This grammar is NOT: LALR(1) SLR(1) LR(1) None of the above
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
554
views
tbb-cd-1
compiler-design
grammar
4
votes
1
answer
24
Test by Bikram | Compiler Design | Test 1 | Question: 7
The number of proper prefixes for a string of length $n$ are ___________. $n+1$ $n(n+1)/2$ $n-1$ $(n-1)/2$
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
539
views
tbb-cd-1
compiler-design
combinatory
counting
3
votes
2
answers
25
Test by Bikram | Compiler Design | Test 1 | Question: 6
Consider the following grammars: $Z \rightarrow TZ'$ $Z' \rightarrow ^* TZ' \mid \epsilon$ $T \rightarrow YT'$ $T ' \rightarrow ^*YT ' \mid \epsilon$ $Y \rightarrow (Z) \mid id$ Which of the following is First(Z)? $\{T, ) \}$ $\{(, id \}$ $\{ ), \$ \}$ None of the above
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
223
views
tbb-cd-1
compiler-design
parsing
grammar
2
votes
1
answer
26
Test by Bikram | Compiler Design | Test 1 | Question: 5
__________ is the most powerful parsing method. LL(1) LALR SLR Canonical LR
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
371
views
tbb-cd-1
compiler-design
parsing
2
votes
1
answer
27
Test by Bikram | Compiler Design | Test 1 | Question: 4
A top-down parser generates ________________. right-most derivation right-most derivation in reverse left-most derivation left-most derivation in reverse
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
294
views
tbb-cd-1
compiler-design
parsing
2
votes
1
answer
28
Test by Bikram | Compiler Design | Test 1 | Question: 3
Consider the following two parse trees for the expression: $6 - 4 - 3$ list list / | \ / | \ / | \ / | \ list --- number number --- list / | \ | | / | \ / | \ | | / | \ list - number 3 6 ... grammar generating the sentence is not ambiguous. Which of the above statements are FALSE? Only $2$ $1$ and $2$ Only $1$ Both statements are correct
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
462
views
tbb-cd-1
compiler-design
parsing
2
votes
1
answer
29
Test by Bikram | Compiler Design | Test 1 | Question: 2
The default type of conflict resolution rule for the Yacc parser generator is _________________. in favor of shift in favor of reduce either shift or reduce dependent on a situation
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
531
views
tbb-cd-1
compiler-design
parsing
3
votes
1
answer
30
Test by Bikram | Compiler Design | Test 1 | Question: 1
Match the following: ... $a-3; b-4; c-2; d-1$ $a-2; b-1; c-4; d-3$ $a-3; b-2; c-4; d-1$
Bikram
asked
in
Compiler Design
Nov 25, 2016
by
Bikram
255
views
tbb-cd-1
compiler-design
parsing
To see more, click for the
full list of questions
or
popular tags
.
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged tbb-cd-1
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...