Error Types in Compilation (Lexical, Syntax, Semantic) MCQs

30 min Score: 0 Attempted: 0/30 Subscribe 1. What is a lexical error? (A) An invalid or unrecognized token during scanning (B) An error in program logic (C) A type mismatch in an expression (D) Missing semicolon 2. Which compiler phase primarily detects lexical errors? (A) Syntax analysis (B) Code generation (C) Semantic analysis (D) … Read more

Error Handling MCQs

30 min Score: 0 Attempted: 0/30 Subscribe 1. What is the main goal of error handling in compilers? (A) To detect, report, and recover from errors gracefully (B) To ignore errors (C) To slow down compilation (D) To optimize code 2. Which type of errors can a compiler detect? (A) Runtime errors only (B) Lexical, … Read more

Instruction Selection and Scheduling MCQs

15 min Score: 0 Attempted: 0/15 Subscribe 1. What is the primary goal of instruction selection in a compiler? (A) To optimize the performance of the target program (B) To allocate registers efficiently (C) To detect syntax errors in the source code (D) To generate machine-specific instructions from intermediate code 2. Which of the following … Read more

Role of Code Generator MCQs

10 min Score: 0 Attempted: 0/10 Subscribe 1. What is the primary role of the code generator in a compiler? (A) To convert high-level language code into machine code (B) To check syntax errors (C) To optimize the source code (D) To generate intermediate representations of the code 2. Which phase does the code generator … Read more

Role of Code Generator MCQs

10 min Score: 0 Attempted: 0/10 Subscribe 1. What is the primary role of the code generator in a compiler? (A) To check syntax errors (B) To generate intermediate representations of the code (C) To optimize the source code (D) To convert high-level language code into machine code 2. Which phase does the code generator … Read more

Code Generation MCQs

20 min Score: 0 Attempted: 0/20 Subscribe 1. What is the primary purpose of code generation in a compiler? (A) To detect and correct errors in the program (B) To optimize the source code (C) To translate high-level language code into machine language (D) To generate intermediate representations of the code 2. In the context … Read more

Peephole Optimization MCQs

20 min Score: 0 Attempted: 0/20 Subscribe 1. What is the main purpose of peephole optimization? (A) To replace high-level code with machine code (B) To improve the readability of code (C) To reduce the number of instructions in the generated code by replacing small instruction sequences (D) To convert machine code into assembly code … Read more

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials