Compiler Construction MCQs with Answers
Practice important Compiler Construction MCQs with answers and explanations.
Multiple Choice Questions
Q11: Regular expressions and automata are studied in relation to ______.
- A: Web development
- B: Compiler theory
- C: Databases
- D: Networking
View Answer
B
Q12: Creating a compiler involves writing a ______ program.
- A: Small
- B: Short
- C: Large
- D: Simple
View Answer
C
Q13: Understanding code structure and semantics helps in becoming a ______.
- A: Designer
- B: Manager
- C: Better programmer
- D: Database admin
View Answer
C
Q14: Compilers translate programs from high-level language to ________.
- A: Machine code
- B: Images
- C: Videos
- D: Text
View Answer
A
Q15: VC++, GCC, JavaC are all types of ______.
- A: Text editors
- B: Compilers
- C: Debuggers
- D: Operating systems
View Answer
B
Q16: What is the function of a translator like Word to PDF converter?
- A: Compile code
- B: Convert programming languages
- C: Convert document formats
- D: Encrypt data
View Answer
C
Q17: In the C function shown, what is the return value based on?
- A: String
- B: Loop
- C: Arithmetic expression
- D: Array
View Answer
C
Q18: Assembly code is optimized for _______.
- A: Programmers
- B: Hardware
- C: Designers
- D: Students
View Answer
B
Q19: Which instruction in assembly saves the base pointer?
- A: pushl %ebp
- B: movl %eax
- C: leave
- D: ret
View Answer
A
Q20: The instruction 'movl 8(%ebp), %eax' means:
- A: Load value from memory
- B: Store value to memory
- C: Add values
- D: Multiply values
View Answer
A