

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.
1. |
The _______ table is created by YACC.(a) LALR parsing(b) LL parsing(c) GLR parsing(d) None of the mentionedThe question was posed to me during an interview.This intriguing question originated from YACCParser Generator topic in section Context Free Grammars and Languages of Automata Theory |
Answer» Right OPTION is (a) LALR parsing |
|
2. |
Which of the following parsers do not relate to Bottom up parsing?(a) LL parser(b) Recursive descent parser(c) Earley parsers(d) All of the mentionedThis question was addressed to me in an interview.Question is taken from Applications in portion Context Free Grammars and Languages of Automata Theory |
Answer» Correct choice is (d) All of the mentioned |
|
3. |
Which of the following statement is false in context of tree terminology?(a) Root with no children is called a leaf(b) A node can have three children(c) Root has no parent(d) Trees are collection of nodes, with a parent child relationshipI got this question during an interview for a job.This interesting question is from Construction and Yield of a Parse Tree in section Context Free Grammars and Languages of Automata Theory |
Answer» The correct choice is (a) Root with no children is called a leaf |
|
4. |
A language that admits only ambiguous grammar:(a) Inherent Ambiguous language(b) Inherent Unambiguous language(c) Context free language(d) Context Sensitive languageThis question was posed to me during an online interview.This key question is from Ambiguous Grammar in section Context Free Grammars and Languages of Automata Theory |
Answer» The correct choice is (a) Inherent Ambiguous LANGUAGE |
|
5. |
LALR in LALR parser stands for:(a) Left aligned left right parser(b) Look ahead left to right parser(c) Language Argument left to right parser(d) None of the mentionedThis question was addressed to me in an internship interview.My question is from Applications topic in portion Context Free Grammars and Languages of Automata Theory |
Answer» The CORRECT answer is (b) LOOK ahead left to RIGHT parser |
|
6. |
A grammar G=(V, T, P, S) is __________ if every production taken one of the two forms:B->aCB->a(a) Ambiguous(b) Regular(c) Non Regular(d) None of the mentionedThis question was posed to me during a job interview.This intriguing question comes from Sentential Forms topic in portion Context Free Grammars and Languages of Automata Theory |
Answer» Right option is (b) Regular |
|
7. |
troff and nroff are _________ in Unix.(a) functions(b) typesetting tools(c) System sofwares(d) None of the mentionedThis question was addressed to me in an online interview.Question is taken from Markup Languages topic in section Context Free Grammars and Languages of Automata Theory |
Answer» CORRECT answer is (B) TYPESETTING tools The explanation: Early examples of COMPUTER markup LANGUAGES can be found in typesetting tools like troff and nroff in Unix. |
|
8. |
YACC is a computer program for ______ operation system.(a) Windows(b) DOS(c) Unix(d) openSUSEI got this question in an interview for internship.I would like to ask this question from YACCParser Generator topic in division Context Free Grammars and Languages of Automata Theory |
Answer» Correct choice is (C) Unix |
|
9. |
Which of the following is false for B programming language?(a) Typeless(b) Influenced by PL/I(c) Designed by Dennis Ritchie(d) None of the mentionedThe question was posed to me in final exam.My question is from YACCParser Generator in section Context Free Grammars and Languages of Automata Theory |
Answer» The CORRECT option is (d) NONE of the mentioned |
|
10. |
State true or false:Statement: The recursive inference procedure determines that string w is in the language of the variable A, A being the starting variable.(a) Statement: The recursive inference procedure determines that string w is in the language of the variable A, A being the starting variable.(b) true(c) falseThis question was addressed to me in an interview for internship.Asked question is from The Language of a Grammar, Inferences and Ambiguity topic in division Context Free Grammars and Languages of Automata Theory |
Answer» Right option is (a) Statement: The recursive INFERENCE procedure determines that string w is in the language of the variable A, A being the starting variable. |
|
11. |
Which of the following parser performs top down parsing?(a) LALR parser(b) LL parser(c) Recursive Accent parser(d) None of the mentionedI have been asked this question in semester exam.My enquiry is from Applications topic in portion Context Free Grammars and Languages of Automata Theory |
Answer» The correct OPTION is (B) LL parser |
|
12. |
Which of them have XML as their default format?(a) IWork(b) LibreOffice(c) OpenOffice(d) All of the mentionedThis question was posed to me in an international level competition.My question is taken from Markup Languages in chapter Context Free Grammars and Languages of Automata Theory |
Answer» The correct CHOICE is (d) All of the mentioned |
|
13. |
Which of the following is true for shift reduce parsers?(a) Scans and parses the input in one forward pass over the text, without any backup.(b) A shift command advances in the input stream by one symbol(c) LALR parser(d) All of the mentionedI have been asked this question during an interview.My doubt stems from Applications in division Context Free Grammars and Languages of Automata Theory |
Answer» The CORRECT choice is (d) All of the MENTIONED |
|
14. |
Which of the following is false for a grammar G in Chomsky Normal Form:(a) G has no useless symbols(b) G has no unit productions(c) G has no epsilon productions(d) None of the mentionedI got this question in an internship interview.The origin of the question is Inferences to Trees, Trees to Derivations in chapter Context Free Grammars and Languages of Automata Theory |
Answer» Correct choice is (d) None of the mentioned |
|
15. |
Which of the following does the given parse tree correspond to?(a) P->1100(b) P->0110(c) P->1100ε(d) P->0101The question was asked in an international level competition.This interesting question is from Construction and Yield of a Parse Tree in portion Context Free Grammars and Languages of Automata Theory |
Answer» Correct OPTION is (b) P->0110 |
|
16. |
If w belongs to L(G), for some CFG, then w has a parse tree, which defines the syntactic structure of w. w could be:(a) program(b) SQL-query(c) XML document(d) All of the mentionedThis question was posed to me in homework.This interesting question is from The Language of a Grammar, Inferences and Ambiguity topic in chapter Context Free Grammars and Languages of Automata Theory |
Answer» Correct CHOICE is (d) All of the mentioned |
|
17. |
Which of the following is/are the suitable approaches for inferencing?(a) Recursive Inference(b) Derivations(c) Both Recursive Inference and Derivations(d) None of the mentionedI had been asked this question in quiz.This intriguing question comes from The Language of a Grammar, Inferences and Ambiguity in division Context Free Grammars and Languages of Automata Theory |
Answer» Right answer is (C) Both Recursive INFERENCE and DERIVATIONS |
|
18. |
Markup Languages are not used for which of the following?(a) playlists(b) content syndication(c) user interfaces(d) none of the mentionedThis question was posed to me in examination.This interesting question is from Markup Languages in chapter Context Free Grammars and Languages of Automata Theory |
Answer» Right choice is (d) none of the mentioned |
|
19. |
A symbol X is ________ if there exists : S->* aXb(a) reachable(b) generating(c) context free(d) none of the mentionedThis question was posed to me during an internship interview.My doubt is from Inferences to Trees, Trees to Derivations topic in division Context Free Grammars and Languages of Automata Theory |
Answer» The CORRECT CHOICE is (a) reachable |
|
20. |
If w belongs to L(G), for some CFG, then w has a parse tree, which tell us the ________ structure of w.(a) semantic(b) syntactic(c) lexical(d) all of the mentionedThis question was posed to me in my homework.This interesting question is from Inferences to Trees, Trees to Derivations in chapter Context Free Grammars and Languages of Automata Theory |
Answer» Right answer is (B) syntactic |
|
21. |
The language accepted by Push down Automaton:(a) Recursive Language(b) Context free language(c) Linearly Bounded language(d) All of the mentionedI had been asked this question in my homework.I'd like to ask this question from The Language of a Grammar, Inferences and Ambiguity in section Context Free Grammars and Languages of Automata Theory |
Answer» Right option is (b) Context free LANGUAGE |
|
22. |
Which of the following is a parser for an ambiguous grammar?(a) GLR parser(b) Chart parser(c) All of the mentioned(d) None of the mentionedThis question was posed to me in quiz.This question is from Ambiguous Grammar topic in division Context Free Grammars and Languages of Automata Theory |
Answer» RIGHT option is (c) All of the mentioned Easiest EXPLANATION: GLR parser: a type of parser for non DETERMINISTIC and AMBIGUOUS grammar Chart parser: aa type of parser for ambiguous grammar. |
|
23. |
Which of the following are not used to express CFG?(a) BNF(b) EBNF, ABNF(c) Van Wijngaarden form(d) None of the mentionedThis question was posed to me in an interview for internship.This interesting question is from YACCParser Generator topic in chapter Context Free Grammars and Languages of Automata Theory |
Answer» Right option is (d) None of the mentioned |
|
24. |
YACC is an acronym for:(a) Yes Another Compile Compiler(b) Yet Another Compile Compiler(c) Yet Another Compiler Compiler(d) Yes Another Compiler CompilerI had been asked this question in homework.I'm obligated to ask this question of YACCParser Generator topic in section Context Free Grammars and Languages of Automata Theory |
Answer» Correct answer is (c) Yet Another Compiler Compiler |
|
25. |
Which among the following cannot be accepted bya regular grammar?(a) L is a set of numbers divisible by 2(b) L is a set of binary complement(c) L is a set of string with odd number of 0(d) L is a set of 0^n1^nI have been asked this question by my college director while I was bunking the class.Question is from Context Free Grammar-Derivations and Definitions topic in portion Context Free Grammars and Languages of Automata Theory |
Answer» Right option is (d) L is a set of 0^n1^n |
|
26. |
Which of the following can be a LALR parser generator?(a) YACC(b) GNU Bison(c) YACC and GNU Bison(d) None of the mentionedI got this question during an interview for a job.My enquiry is from Applications in section Context Free Grammars and Languages of Automata Theory |
Answer» The correct choice is (c) YACC and GNU Bison |
|
27. |
XML is a _________ markup language.(a) meta(b) beta(c) octa(d) petaI have been asked this question during an interview for a job.My doubt is from Markup Languages topic in portion Context Free Grammars and Languages of Automata Theory |
Answer» The CORRECT option is (a) META |
|
28. |
Which among the following is a CFG for the given Language:(a) L={x∈{0,1}*|number of zeroes in x=number of one’s in x}(b) S->e|0S1|1S0|SS(c) S->0B|1A|eA->0SB->1S(d) All of the mentionedThe question was asked during an online interview.This is a very interesting question from Sentential Forms topic in portion Context Free Grammars and Languages of Automata Theory |
Answer» Correct CHOICE is (c) S->0B|1A|eA->0SB->1S |
|
29. |
State true or false:Statement: LALR parsers uses tables rather than mutually recursive functions.(a) Statement: LALR parsers uses tables rather than mutually recursive functions.(b) true(c) falseI got this question by my school teacher while I was bunking the class.The doubt is from Applications in portion Context Free Grammars and Languages of Automata Theory |
Answer» Right choice is (b) true |
|
30. |
Which of the following statement is correct?(a) All Regular grammar are context free but not vice versa(b) All context free grammar are regular grammar but not vice versa(c) Regular grammar and context free grammar are the same entity(d) None of the mentionedI had been asked this question in an internship interview.My enquiry is from Context Free Grammar-Derivations and Definitions in portion Context Free Grammars and Languages of Automata Theory |
Answer» RIGHT answer is (a) All Regular grammar are context FREE but not vice versa For explanation I WOULD say: Regular grammar is a SUBSET of context free grammar and thus all regular GRAMMARS are context free. |
|
31. |
State true or false:Statement: R->R|TT->ε is an ambiguous grammar(a) Statement: R->R|TT->ε is an ambiguous grammar(b) true(c) falseI had been asked this question during an interview.The origin of the question is Ambiguous Grammar topic in portion Context Free Grammars and Languages of Automata Theory |
Answer» The correct answer is (a) STATEMENT: R->R|TT->ε is an ambiguous grammar |
|
32. |
Which of the following is an real-world programming language ambiguity?(a) dangling else problem(b) halting problem(c) maze problem(d) none of the mentionedThis question was posed to me in class test.I'd like to ask this question from Ambiguous Grammar in section Context Free Grammars and Languages of Automata Theory |
Answer» The correct answer is (a) dangling else PROBLEM |
|
33. |
A symbol X is called to be useful if and only if its is:(a) generating(b) reachable(c) both generating and reachable(d) none of the mentionedI have been asked this question during an interview.This interesting question is from Inferences to Trees, Trees to Derivations in division Context Free Grammars and Languages of Automata Theory |
Answer» The correct option is (C) both GENERATING and reachable |
|
34. |
The entity which generate Language is termed as:(a) Automata(b) Tokens(c) Grammar(d) DataI had been asked this question by my college professor while I was bunking the class.The query is from Context Free Grammar-Derivations and Definitions in section Context Free Grammars and Languages of Automata Theory |
Answer» The correct choice is (c) Grammar |
|
35. |
A CFG is not closed under(a) Dot operation(b) Union Operation(c) Concatenation(d) IterationThis question was addressed to me in a job interview.I'd like to ask this question from Ambiguous Grammar topic in section Context Free Grammars and Languages of Automata Theory |
Answer» Right CHOICE is (d) Iteration |
|
36. |
Which of the following are always unambiguous?(a) Deterministic Context free grammars(b) Non-Deterministic Regular grammars(c) Context sensitive grammar(d) None of the mentionedThis question was posed to me in an online quiz.My question is taken from Ambiguous Grammar in portion Context Free Grammars and Languages of Automata Theory |
Answer» Right choice is (a) DETERMINISTIC Context FREE grammars |
|
37. |
Which of the following parser reaches the root symbol of the tree at last?(a) Top down parser(b) Bottom up parser(c) TOP down and Bottom up parser(d) None of the mentionedI have been asked this question in an interview for internship.The query is from Applications in chapter Context Free Grammars and Languages of Automata Theory |
Answer» Correct option is (b) BOTTOM up PARSER |
|
38. |
The original YACC as written in __________ language(a) R programming language(b) C programming language(c) B programming language(d) None of the mentionedI had been asked this question in an international level competition.My enquiry is from YACCParser Generator topic in chapter Context Free Grammars and Languages of Automata Theory |
Answer» Right CHOICE is (c) B programming language |
|
39. |
State true or false:can no longer be 2h-1.(a) can no longer be 2h-1.(b) true(c) falseI have been asked this question during an online exam.My question is taken from Inferences to Trees, Trees to Derivations topic in portion Context Free Grammars and Languages of Automata Theory |
Answer» Correct choice is (a) can no longer be 2h-1. |
|
40. |
If L1 and L2 are context free languages, which of the following is context free?(a) L1*(b) L2UL1(c) L1.L2(d) All of the mentionedI have been asked this question in semester exam.The query is from Sentential Forms topic in chapter Context Free Grammars and Languages of Automata Theory |
Answer» Right choice is (d) All of the mentioned |
|
41. |
The most suitable data structure used to represent the derivations in compiler:(a) Queue(b) Linked List(c) Tree(d) Hash TablesI had been asked this question in final exam.The doubt is from Construction and Yield of a Parse Tree topic in portion Context Free Grammars and Languages of Automata Theory |
Answer» Correct choice is (c) TREE |
|
42. |
Which of the following is an example of inherent ambiguous language?(a) {a^n|n>1}(b) {a^nb^nc^md^m| n,m > 0}(c) {0^n1^n|n>0}(d) None of the mentionedI got this question by my college director while I was bunking the class.This interesting question is from Ambiguous Grammar in chapter Context Free Grammars and Languages of Automata Theory |
Answer» The correct choice is (b) {a^nb^nc^md^m| n,m > 0} |
|
43. |
The YACC takes C code as input and outputs_________(a) Top down parsers(b) Bottom up parsers(c) Machine code(d) None of the mentionedI had been asked this question in an interview.The origin of the question is YACCParser Generator topic in division Context Free Grammars and Languages of Automata Theory |
Answer» The correct CHOICE is (b) Bottom up PARSERS |
|
44. |
Which of the following languages are most suitable for implement context free languages ?(a) C(b) Perl(c) Assembly Language(d) None of the mentionedI got this question in an interview for job.I need to ask this question from Sentential Forms in section Context Free Grammars and Languages of Automata Theory |
Answer» Correct CHOICE is (a) C |
|
45. |
Which of the following statements are correct for a concept called inherent ambiguity in CFL?(a) Every CFG for L is ambiguous(b) Every CFG for L is unambiguous(c) Every CFG is also regular(d) None of the mentionedI had been asked this question in examination.This question is from The Language of a Grammar, Inferences and Ambiguity in division Context Free Grammars and Languages of Automata Theory |
Answer» Right ANSWER is (a) Every CFG for L is ambiguous |
|
46. |
Choose the correct option:Statement: There exists two inference approaches:a) Recursive Inferenceb) Derivation(a) true(b) partially true(c) false(d) none of the mentionedThe question was asked in an online interview.My question is from The Language of a Grammar, Inferences and Ambiguity in portion Context Free Grammars and Languages of Automata Theory |
Answer» CORRECT choice is (a) true Explanation: We APPLY the productions of a CFG to INFER that certain STRINGS are in a language of certain variable. |
|
47. |
Is the following statement correct?(a) Statement: Recursive inference and derivation are equivalent.(b) Yes(c) NoThe question was asked in homework.I'm obligated to ask this question of The Language of a Grammar, Inferences and Ambiguity in chapter Context Free Grammars and Languages of Automata Theory |
Answer» RIGHT answer is (a) Statement: Recursive inference and DERIVATION are EQUIVALENT. Explanation: YES, they are equivalent. Both the terminologies represent the two approaches of recursive inferencing. |
|
48. |
Which of the following is not a notion of Context free grammars?(a) Recursive Inference(b) Derivations(c) Sentential forms(d) All of the mentionedThe question was asked during an interview.My query is from The Language of a Grammar, Inferences and Ambiguity topic in portion Context Free Grammars and Languages of Automata Theory |
Answer» Correct option is (d) All of the mentioned |
|
49. |
Production Rule: aAb->agb belongs to which of the following category?(a) Regular Language(b) Context free Language(c) Context Sensitive Language(d) Recursively Ennumerable LanguageI got this question during an interview for a job.I want to ask this question from Context Free Grammar-Derivations and Definitions in portion Context Free Grammars and Languages of Automata Theory |
Answer» Right choice is (c) Context Sensitive Language |
|
50. |
For S->0S1|e for ∑={0,1}*, which of the following is wrong for the language produced?(a) Non regular language(b) 0^n1^n | n>=0(c) 0^n1^n | n>=1(d) None of the mentionedThis question was addressed to me in a job interview.My question is based upon Context Free Grammar-Derivations and Definitions in chapter Context Free Grammars and Languages of Automata Theory |
Answer» Correct ANSWER is (d) None of the mentioned |
|