Computer Science - Principles of Computer Compiler Design
Quiz-summary
0 of 96 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
Information
This is MCQs of Computer Science Subject.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 96 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- Answered
- Review
-
Question 1 of 96
1. Question
Cross-compiler is a compiler
Correct
Incorrect
-
Question 2 of 96
2. Question
Incremental-compiler is a compiler
Correct
Incorrect
-
Question 3 of 96
3. Question
For which of the following reasons. an interpreter is preferred to a compiler?
Correct
Incorrect
-
Question 4 of 96
4. Question
For which of the following reasons a compiler is preferable to an interpreter?
Correct
Incorrect
-
Question 5 of 96
5. Question
The cost of developing a compiler is proportional to the
Correct
Incorrect
-
Question 6 of 96
6. Question
An ideal compiler should
Correct
Incorrect
-
Question 7 of 96
7. Question
An optimizing compiler
Correct
Incorrect
-
Question 8 of 96
8. Question
In a compiler, grouping of characters into tokens is done by the
Correct
Incorrect
-
Question 9 of 96
9. Question
Whether a given pattern constitute a token or not
Correct
Incorrect
-
Question 10 of 96
10. Question
A grammar will be meaningless if the
Correct
Incorrect
-
Question 11 of 96
11. Question
Which of the following grammars are not phase-structured ?
Correct
Incorrect
-
Question 12 of 96
12. Question
Which of the following is the most general phase-structured grammar?
Correct
Incorrect
-
Question 13 of 96
13. Question
In a context-sensitive grammar,
Correct
Incorrect
-
Question 14 of 96
14. Question
In a context-free grammar.
Correct
Incorrect
-
Question 15 of 96
15. Question
If w is a string of terminals and A, B are two non-terminals. than which of the following are right-linear grammars?
Correct
Incorrect
-
Question 16 of 96
16. Question
If a is a terminal and S,A, B are three non-terminals, then which of the following are regular grammars?
Correct
Incorrect
-
Question 17 of 96
17. Question
Representing the syntax by a grammar is advantageous because
Correct
Incorrect
-
Question 18 of 96
18. Question
CFG can be recognized by a
Correct
Incorrect
-
Question 19 of 96
19. Question
CFG can be recognized by
Correct
Incorrect
-
Question 20 of 96
20. Question
Choose the correct statements.
Correct
Incorrect
-
Question 21 of 96
21. Question
A grammar can have
Correct
Incorrect
-
Question 22 of 96
22. Question
A top-down parser generates
Correct
Incorrect
-
Question 23 of 96
23. Question
A bottom-up parser generates
Correct
Incorrect
-
Question 24 of 96
24. Question
A given grammar is said to be ambiguous if
Correct
Incorrect
-
Question 25 of 96
25. Question
The grammar E → E + E | E*E | a, is
Correct
Incorrect
-
Question 26 of 96
26. Question
Choose the correct statement.
Correct
Incorrect
-
Question 27 of 96
27. Question
Consider the grammar
S → ABSc | Abc
BA → AB
Bb → bb
Ab → ab
Aa → aa
Which of the following sentences can be derived by this grammar?Correct
Incorrect
-
Question 28 of 96
28. Question
The language generated by the above grammar is the set of all strings, made up of a, b, c, such that
Correct
Incorrect
-
Question 29 of 96
29. Question
In an incompletely specified automata
Correct
Incorrect
-
Question 30 of 96
30. Question
The main difference between a DFSA and a NDFSA is
Correct
Incorrect
-
Question 31 of 96
31. Question
Two finite state machines are said to be equivalent if they
Correct
Incorrect
-
Question 32 of 96
32. Question
Choose the correct answer.
FORTRAN is aCorrect
Incorrect
-
Question 33 of 96
33. Question
If two finite states machine M and N are isomorphic, then M can be transformed to N by relabeling
Correct
Incorrect
-
Question 34 of 96
34. Question
In a syntax directed translation scheme, if the value of an attribute of a node is a function of the values of the attributes of its children, then it is called a
Correct
Incorrect
-
Question 35 of 96
35. Question
Synthesized attribute can easily be simulated by an
Correct
Incorrect
-
Question 36 of 96
36. Question
For which of the following situations inherited attribute is a natural choice ?
Correct
Incorrect
-
Question 37 of 96
37. Question
The graph depicting the inter-dependencies of the attributes of different nodes in a parse tree is called a
Correct
Incorrect
-
Question 38 of 96
38. Question
Choose the correct statements.
Correct
Incorrect
-
Question 39 of 96
39. Question
A syntax tree
Correct
Incorrect
-
Question 40 of 96
40. Question
Syntax directed translation scheme is desirable because
Correct
Incorrect
-
Question 41 of 96
41. Question
Which of the following is not an intermediate code form?
Correct
Incorrect
-
Question 42 of 96
42. Question
Three address codes can be implemented by
Correct
Incorrect
-
Question 43 of 96
43. Question
Three address code involves
Correct
Incorrect
-
Question 44 of 96
44. Question
Symbol table can be used for
Correct
Incorrect
-
Question 45 of 96
45. Question
The best way to compare the different implementations of symbol table is to compare the time required to
Correct
Incorrect
-
Question 46 of 96
46. Question
Which of the following symbol table implementation is based on the property of locality of reference?
Correct
Incorrect
-
Question 47 of 96
47. Question
Which of the following symbol table implementation is best suited if access time is to be minimum?
Correct
Incorrect
-
Question 48 of 96
48. Question
Which of the following symbol table implementation makes efficient use of memory ?
Correct
Incorrect
-
Question 49 of 96
49. Question
Access time of the symbol table will be logarithmic if it is implemented by a
Correct
Incorrect
-
Question 50 of 96
50. Question
An ideal compiler should
Correct
Incorrect
-
Question 51 of 96
51. Question
Which of the following is not a source of error?
Correct
Incorrect
-
Question 52 of 96
52. Question
Any transcription error can be repaired by
Correct
Incorrect
-
Question 53 of 96
53. Question
Hamming distance is a
Correct
Incorrect
-
Question 54 of 96
54. Question
Error repair may
Correct
Incorrect
-
Question 55 of 96
55. Question
A parser with the valid prefix property is advantageous because
Correct
Incorrect
-
Question 56 of 96
56. Question
The advantage of panic mode of error recovery is that
Correct
Incorrect
-
Question 57 of 96
57. Question
To recover from an error, the operator precedence parser may
Correct
Incorrect
-
Question 58 of 96
58. Question
Which of the following optimization techniques are typically applied on loops?
Correct
Incorrect
-
Question 59 of 96
59. Question
The technique of replacing run time computations by compile time computations is called
Correct
Incorrect
-
Question 60 of 96
60. Question
The graph that shows the basic blocks and their successor relationship is called
Correct
Incorrect
-
Question 61 of 96
61. Question
Reduction in strength means
Correct
Incorrect
-
Question 62 of 96
62. Question
A basic block can be analyzed by a
Correct
Incorrect
-
Question 63 of 96
63. Question
ud-chaining is useful for
Correct
Incorrect
-
Question 64 of 96
64. Question
Which of the following concepts can be used to identify loops ?
Correct
Incorrect
-
Question 65 of 96
65. Question
Which of the following are not loop optimization techniques?
Correct
Incorrect
-
Question 66 of 96
66. Question
Running time of a program depends on the
Correct
Incorrect
-
Question 67 of 96
67. Question
du-chaining
Correct
Incorrect
-
Question 68 of 96
68. Question
Which of the following comments about peep-hole optimization are true?
Correct
Incorrect
-
Question 69 of 96
69. Question
Shift-reduces parsers are
Correct
Incorrect
-
Question 70 of 96
70. Question
Recursive decent parsing is an example of
Correct
Incorrect
-
Question 71 of 96
71. Question
In operator precedence parsing. precedence relations are defined
Correct
Incorrect
-
Question 72 of 96
72. Question
For parsing arithmetic expressions, involving (, ). + and -. the precedence relation between – and -. will be <. if
Correct
Incorrect
-
Question 73 of 96
73. Question
For the previous problem. the precedence relation between ) and ( will be
Correct
Incorrect
-
Question 74 of 96
74. Question
LR stands for
Correct
Incorrect
-
Question 75 of 96
75. Question
LR parsers are attractive because
Correct
Incorrect
-
Question 76 of 96
76. Question
Which of the following is the most powerful parser?
Correct
Incorrect
-
Question 77 of 96
77. Question
Choose the correct statements.
Correct
Incorrect
-
Question 78 of 96
78. Question
YACC builds up
Correct
Incorrect
-
Question 79 of 96
79. Question
Choose the correct statements.
Correct
Incorrect
-
Question 80 of 96
80. Question
LR(k) grammar
Correct
Incorrect
-
Question 81 of 96
81. Question
The set of all viable prefixes of right sentential form of a given grammar
Correct
Incorrect
-
Question 82 of 96
82. Question
The ‘k’ , in LR(k) cannot be
Correct
Incorrect
-
Question 83 of 96
83. Question
This grammar is
Correct
Incorrect
-
Question 84 of 96
84. Question
The above grammar is used to generate all valid arithmetic expressions in a hypothetical language in which
Correct
Incorrect
-
Question 85 of 96
85. Question
The above grammar is used to generate all valid arithmetic expressions in a hypothetical language in which
Correct
Incorrect
-
Question 86 of 96
86. Question
Back-patching is useful for handling
Correct
Incorrect
-
Question 87 of 96
87. Question
Consider the grammar
E → TE’
E’ → +TE’ | ε
T → FT’
T’ → +FT’ | ε
F → (E) | id
First1 (E) will be same as that ofCorrect
Incorrect
-
Question 88 of 96
88. Question
Follow1 (F) is
Correct
Incorrect
-
Question 89 of 96
89. Question
Which of the Following remarks logically follows?
Correct
Incorrect
-
Question 90 of 96
90. Question
Merging states with a common core may produce ____, conflicts but does not produce ____ conflicts in an LALR parser
Correct
Incorrect
-
Question 91 of 96
91. Question
For a CFG, FOLLOW (A) is the set of all terminals that can immediately appear to the right of the non-terminal A in some sentential form. We define two sets LFOLLOW (A) and RFOLLOW (A) by replacing the word sentential by “Left most sentential” and “Right most sentential” respectively in the definition of FOLLOW(A).
Choose the correct statements(s).Correct
Incorrect
-
Question 92 of 96
92. Question
In a programming language, an identifier is permitted to be a letter followed by any number of letters or digits. If L and D denote the set of letters and digits respectively, which of the following expressions defines an identifier?
Correct
Incorrect
-
Question 93 of 96
93. Question
A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar
S → xxW { print “1” }
S → Y { print “2” }
W → Sz { print “3” }
What is the translation of xxxxyzz using the syntax directed translation scheme described by the above rules?Correct
Incorrect
-
Question 94 of 96
94. Question
Which of the following features cannot be captured by CFG?
Correct
Incorrect
-
Question 95 of 96
95. Question
A language L allows the declaration of arrays whose sizes are not known during compilation
It is required to make efficient use of memory. Which one of the following is true?Correct
Incorrect
-
Question 96 of 96
96. Question
Consider an ε-free CFG. If for every pair of productions A → u A → v
Correct
Incorrect