Analysis of Algorithms and Computational Complexity Questions and Answers

Practice Mode
Showing 10 of 239 questions
Q61
Which of the following statements is incorrect ?
  • A LR parsers can be constructed to recognize virtually all programming language constructs for which context for which context free grammar can be written
  • B The LR parsing method is the most general non backtracking shift reduce parsing method known
  • C An LR parser can detect syntactic error as soon as it is possible to do son on a left to right scan of the input
  • D The class of grammars that can be parsed using LR methods is a subset of the class of grammars that can be parsed with predictive parsers.
Answer: Option D
Q62
Which of the following tool is known as the Parser generator ?
  • A Lex
  • B Yaac
  • C TeX
  • D Emacs
Answer: Option B
Q63
Which of the following statements is wrong ?
  • A No left-recursive grammar can LL (1)
  • B No LL (1) grammar can be ambiguous
  • C Every LR (1) grammar is an LL (1) grammar
  • D Every grammar can be converted into an equivalent opertor grammar
Answer: Option C
Q64
Search tables used by compilers for efficient searching generally use
  • A hash tables
  • B linear lists of records
  • C binary search tables
  • D binary search trees
Answer: Option A
Q65
FORTRAN implementations do not permit recursion because
  • A they use static allocationn for variables
  • B they use dynamic allocation for variables
  • C stacks are not available on all machines
  • D it is not possible to implement recursion on all machinesd
Answer: Option A
Q66
An unrestricted use off the "goto" statement is harmful beccause
  • A it makes it more difficult to verify programs
  • B it increases the running time of the programs
  • C it increases the memory required for the programs
  • D it results in compiler generating longer machine code
Answer: Option A
Q67
Which of the following features of Pascal cannot be captured by context-free grammars ?
  • A Syntax of if-then-else statements
  • B syntax of recursive procedures
  • C whether a variable has been declared before its use
  • D variable names of arbitrary length
Answer: Option C
Q68
YACC generates parsers based on
  • A LALR (1) grammars
  • B LL (1) grammars
  • C operator-precedence grammars
  • D general context-free grammars
Answer: Option B
Q69
Which of the following conversions is not possible (algorithmically) ?
  • A NFA to DFA
  • B NPDA to DPDA
  • C regular grammar to conext-free grammar
  • D nondeterministic Turing machine (TM) to deterministic TM
Answer: Option A
Q70
Which of the following languages is not well suited for computation ?
  • A Pascal
  • B FORTRAN
  • C C
  • D COBOL
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test