The document contains a set of 50 multiple-choice questions (MCQs) with answers focused on System Software, covering key topics such as Lexical Analysis, Parsing, Syntax-Directed Translation, Runtime Environment, Code Generation, and Linking. Each question tests knowledge on various aspects of compiler design and software development processes. The answers provided help reinforce understanding of the concepts related to system software.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
8 views9 pages
Top 50 MCQs On System Software
The document contains a set of 50 multiple-choice questions (MCQs) with answers focused on System Software, covering key topics such as Lexical Analysis, Parsing, Syntax-Directed Translation, Runtime Environment, Code Generation, and Linking. Each question tests knowledge on various aspects of compiler design and software development processes. The answers provided help reinforce understanding of the concepts related to system software.
1. The output of lexical analysis is: A) Parse tree B) Syntax tree C) Token stream D) Intermediate code Answer: C 2. Which of the following tools helps in lexical analysis? A) YACC B) LEX C) BISON D) GCC Answer: B 3. The job of parser is to: A) Generate tokens B) Match grammar rules C) Generate intermediate code D) Perform semantic analysis Answer: B 4. Syntax errors are detected in which phase? A) Lexical Analysis B) Syntax Analysis C) Semantic Analysis D) Code Generation Answer: B 5. Which of the following is a bottom-up parser? A) Recursive descent B) LL(1) C) LR D) Predictive parser Answer: C 6. Which parser uses a stack for parsing? A) LL Parser B) LR Parser C) Shift-Reduce Parser D) All of the above Answer: D 7. In syntax-directed translation, semantic actions are associated with: A) Tokens B) Non-terminals C) Grammar rules D) Terminals only Answer: C 8. Intermediate code is generated in which phase? A) Syntax Analysis B) Semantic Analysis C) Code Optimization D) Intermediate Code Generation Answer: D 9. A symbol table is used to: A) Store source code B) Store grammar rules C) Store identifiers and attributes D) Store errors Answer: C 10. In a compiler, heap memory is managed in: A) Code generation B) Lexical analysis C) Runtime environment D) Parser Answer: C 11. A linker is used to: A) Parse the code B) Optimize the code C) Combine object files D) Compile source code Answer: C 12. Which is faster: static or dynamic linking? A) Static B) Dynamic C) Both are same D) Depends on OS Answer: A 13. Which of the following is true about dynamic linking? A) Libraries are embedded at compile-time B) Libraries are loaded at runtime C) Source code is required D) More memory efficient Answer: B 14. Which phase handles type checking? A) Lexical B) Syntax C) Semantic D) Intermediate Answer: C 15. Which of the following is not part of lexical analysis? A) Removing comments B) Recognizing keywords C) Parsing grammar D) Identifying literals Answer: C 16. Which is used for syntax analysis? A) DFA B) NFA C) Context-Free Grammar D) Regular Grammar Answer: C 17. What is the first step in compiling a program? A) Semantic analysis B) Code generation C) Lexical analysis D) Optimization Answer: C 18. Peephole optimization is performed during: A) Lexical phase B) Semantic phase C) Intermediate code generation D) Code generation Answer: D 19. A recursive descent parser is an example of: A) Bottom-up parser B) Top-down parser C) LR parser D) SLR parser Answer: B 20. Tokens are generated by: A) Parser B) Semantic analyzer C) Lexical analyzer D) Optimizer Answer: C 21. Which is not an intermediate code form? A) Quadruples B) Triples C) Tokens D) Three-address code Answer: C 22. What is the role of a loader? A) Load compiled code into memory B) Link source files C) Translate code D) Analyze syntax Answer: A 23. Which of these is a static data structure used by compilers? A) Stack B) Heap C) Symbol table D) Activation record Answer: C 24. LR(k) parsers are used for: A) Lexical analysis B) Top-down parsing C) Bottom-up parsing D) Dynamic linking Answer: C 25. Code optimization improves: A) Correctness B) Execution time C) Syntax D) Memory errors Answer: B 26. The control stack in runtime environment stores: A) Variable values B) Symbol tables C) Function return addresses D) Errors Answer: C 27. In static linking, libraries are linked at: A) Run time B) Compile time C) Load time D) Execution time Answer: B 28. Which phase generates assembly code? A) Intermediate code generation B) Syntax analysis C) Code generation D) Lexical analysis Answer: C 29. Which of these is not used in parsing techniques? A) DFA B) Stack C) Parse table D) Hash table Answer: D 30. An example of a dynamic runtime structure is: A) Global variable B) Static table C) Activation record D) Register Answer: C 31. Which grammar is used for parsing? A) Regular B) Context-sensitive C) Context-free D) Machine grammar Answer: C 32. Which parser handles left recursion? A) LL B) Recursive descent C) LR D) Predictive parser Answer: C 33. Directed Acyclic Graph (DAG) is used in: A) Lexing B) Parsing C) Optimization D) Linking Answer: C 34. Lexical analyzer works based on: A) DFA B) PDA C) Turing Machine D) Stack Answer: A 35. Which of these is not part of runtime memory? A) Heap B) Stack C) Text D) Parser Answer: D 36. What does LEX produce? A) Symbol table B) DFA C) Tokens D) Source code Answer: C 37. YACC stands for: A) Yet Another Compiler Compiler B) Your Advanced C Compiler C) Yes And Code Compiler D) None of the above Answer: A 38. Register allocation is part of: A) Parsing B) Code generation C) Semantic analysis D) Linking Answer: B 39. A shift-reduce parser belongs to: A) Top-down parsing B) Recursive parsing C) Bottom-up parsing D) Syntax-directed translation Answer: C 40. Which helps manage function calls? A) Parser B) Symbol table C) Stack D) Lexer Answer: C 41. Relocation is handled by: A) Parser B) Optimizer C) Loader D) Lexer Answer: C 42. In compilation, errors like undeclared variables are found in: A) Lexical phase B) Syntax phase C) Semantic phase D) Linking phase Answer: C 43. In parsing, FIRST and FOLLOW sets are used in: A) Top-down parsers B) Bottom-up parsers C) Code generation D) Symbol resolution Answer: A 44. Machine code is produced in: A) Lexical analysis B) Syntax analysis C) Code generation D) Linking Answer: C 45. A symbol table does not store: A) Variable names B) Grammar rules C) Function names D) Types Answer: B 46. Parser generators produce: A) Intermediate code B) Lexers C) Parsing tables D) Machine code Answer: C 47. Which grammar supports backtracking? A) LL(1) B) LR(1) C) Regular grammar D) Recursive descent Answer: D 48. The part of compiler checking scope rules is: A) Lexer B) Syntax analyzer C) Semantic analyzer D) Optimizer Answer: C 49. Syntax-directed definitions are used for: A) Code generation B) Type checking C) Attribute evaluation D) All of the above Answer: D 50. Which is the final phase of a compiler? A) Lexical analysis B) Parsing C) Optimization D) Code generation Answer: D