InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
Let L denotes the language generated by the grammar S – OSO/00. Which of the following is true?(a) L = O(b) L is regular but not O(c) L is context free but not regular(d) L is not context freeThis question was addressed to me in an interview for internship.Asked question is from Finite Automata and Regular Expressions in division Compiler Introduction of Compiler |
|
Answer» The correct answer is (b) L is regular but not O |
|
| 52. |
The smallest set A such that A ∪ {1, 2} = {1, 2, 3, 5, 9} is?(a) {2,3,5}(b) {1, 2, 5, 9}(c) {3, 5, 9}(d) None of the mentionedI have been asked this question in an interview for job.Question is from Relations in section Compiler Introduction of Compiler |
|
Answer» Correct OPTION is (c) {3, 5, 9} |
|
| 53. |
If every aRb implies bRa then a relation R will be a symmetric relation.(a) True(b) FalseThis question was posed to me in a national level competition.The above asked question is from Relations topic in division Compiler Introduction of Compiler |
|
Answer» The CORRECT OPTION is (a) True |
|
| 54. |
A system program that brings together separately compiled modules of a program into a form language that is suitable for execution.(a) Assembler(b) Linking loader(c) Cross compiler(d) None of the mentionedI got this question by my college professor while I was bunking the class.The question is from Lexical Analysis in division Compiler Introduction of Compiler |
|
Answer» Right answer is (b) Linking loader |
|
| 55. |
A system program that combines separately compiled modules of a program into a form suitable for execution is called ___________(a) Assembler(b) Linking loader(c) Cross compiler(d) None of the mentionedI have been asked this question in a job interview.The origin of the question is Cross Compiler in section Compiler Introduction of Compiler |
|
Answer» Right ANSWER is (b) LINKING loader |
|
| 56. |
If a set A has n elements, then the total number of subsets of A is?(a) N(b) 2^n(c) N^2(d) 2nThis question was addressed to me during a job interview.This interesting question is from Relations topic in chapter Compiler Introduction of Compiler |
|
Answer» RIGHT CHOICE is (b) 2^n Explanation: Number of subsets of A = ^NC0 + ^NC1 + . . . . . + ^NCN = 2^n. |
|
| 57. |
You can use RE, if you expect the value of a property to change in an unpredictable way each time its run.(a) True(b) FalseI have been asked this question during an interview.This intriguing question comes from Regular Expression topic in section Compiler Introduction of Compiler |
|
Answer» CORRECT answer is (b) False For explanation: For every cycle the values does not CHANGE unpredictably because the type of GRAMMAR that it ACCEPTS is DEFINED. |
|
| 58. |
(a,b) what is a?(a) Domain(b) Range(c) Domain & Range(d) None of the mentionedI have been asked this question in class test.I'm obligated to ask this question of Relations in chapter Compiler Introduction of Compiler |
|
Answer» The CORRECT CHOICE is (a) DOMAIN |
|
| 59. |
System program such a compiler are designed so that they are ________(a) Re-enterable(b) Non-Usable(c) Serially usable(d) None of the mentionedI got this question in final exam.This interesting question is from Lexical Analysis topic in division Compiler Introduction of Compiler |
|
Answer» The correct OPTION is (a) Re-enterable |
|
| 60. |
Which symbol table implementation is based on the property of locality of reference?(a) Linear list(b) Search tree(c) Hash Table(d) Self OrganisationI got this question during a job interview.This intriguing question comes from Lexical Analysis topic in division Compiler Introduction of Compiler |
|
Answer» RIGHT answer is (C) Hash Table The EXPLANATION is: Hash table is used as a reference for SYMBOL table because it is EFFICIENT. |
|
| 61. |
Which one of the following statement is FALSE?(a) Context-free languages are closed under union(b) Context-free languages are closed under concatenation(c) Context-free languages are closed under intersection(d) Context-free languages are closed under Kleene closureI had been asked this question in examination.My question comes from Finite Automata and Regular Expressions in section Compiler Introduction of Compiler |
|
Answer» Correct OPTION is (c) Context-free languages are closed under intersection |
|
| 62. |
If R is regular language and Q is any language (regular/ non regular), then Pref (Q in R) is _____________(a) Non-regular(b) Equal(c) Infinite(d) RegularThis question was addressed to me during an internship interview.The origin of the question is Regular Expression in chapter Compiler Introduction of Compiler |
|
Answer» CORRECT option is (d) Regular The best I can explain: So SAYS the DEFINITION of Regular Grammar. |
|
| 63. |
Consider the production of the grammar S->AA A->aa A->bb Describe the language specified by the production grammar.(a) L = {aaaa,aabb,bbaa,bbbb}(b) L = {abab,abaa,aaab,baaa}(c) L = {aaab,baba,bbaa,bbbb}(d) L = {aaaa,abab,bbaa,aaab}The question was asked in exam.I would like to ask this question from Regular Expression in division Compiler Introduction of Compiler |
|
Answer» Correct answer is (a) L = {AAAA,aabb,bbaa,bbbb} |
|
| 64. |
RE can be used only for values of type string and number.(a) True(b) FalseThis question was addressed to me in semester exam.My query is from Regular Expression topic in section Compiler Introduction of Compiler |
|
Answer» The correct option is (B) False |
|
| 65. |
Number of states of FSM required to simulate behaviour of a computer with a memory capable of storing “m” words, each of length ‘n’.(a) m x 2^n(b) 2^mn(c) 2^(m+n)(d) all of the mentionedThe question was asked in a job interview.My question is taken from Finite Automata and Regular Expressions in section Compiler Introduction of Compiler |
|
Answer» Correct option is (b) 2^mn |
|
| 66. |
The production of the form no terminal → Λ is said to be null production.(a) False(b) TrueThis question was posed to me during an interview.Asked question is from Regular Expression topic in division Compiler Introduction of Compiler |
|
Answer» CORRECT option is (B) True Easy EXPLANATION: Here the NON terminal that GIVES null will said to have a null production. |
|
| 67. |
The regular expression have all strings of 0′s and 1′s with no two consecutive 0′s is?(a) (0+1)(b) (0+1)*(c) (0+∈) (1+10)*(d) (0+1)* 011I have been asked this question in an online quiz.My question comes from Regular Expression topic in chapter Compiler Introduction of Compiler |
|
Answer» CORRECT option is (c) (0+∈) (1+10)* For explanation: From the former bracket we choose 0 or epsilon. Then from the latter part 1 or 10 which can be followed by 1 or 10. |
|
| 68. |
Cross compiler is used in Bootstrapping.(a) True(b) FalseI have been asked this question in an interview for job.This intriguing question originated from Cross Compiler in chapter Compiler Introduction of Compiler |
|
Answer» The CORRECT option is (a) True |
|
| 69. |
The RE gives none or many instances of an x or y is?(a) (x+y)(b) (x+y)*(c) (x* + y)(d) (xy)*I have been asked this question in an online interview.This question is from Regular Expression topic in chapter Compiler Introduction of Compiler |
|
Answer» Right ANSWER is (b) (x+y)* |
|
| 70. |
The production Grammar is {S->aSbb,S->abb} is __________ grammar.(a) Type-3(b) Type-2(c) Type-1(d) Type-0This question was addressed to me in a job interview.This question is from Finite Automata and Regular Expressions in chapter Compiler Introduction of Compiler |
|
Answer» CORRECT ANSWER is (b) Type-2 To explain I WOULD SAY: As per the DEFINITION of type-2 grammar. |
|