Which one of the following is NOT performed during compilation?
2014
Which one of the following is NOT performed during compilation?
- A.
Dynamic memory allocation
- B.
Type checking
- C.
Symbol table management
- D.
Inline expansion
Attempted by 231 students.
Show answer & explanation
Correct answer: A
Answer: Dynamic memory allocation is NOT performed during compilation.
Type checking: Performed at compile time during semantic analysis to ensure type safety and report errors.
Symbol table management: The compiler builds and uses symbol tables while parsing and analyzing the program.
Inline expansion: Usually a compile-time optimization where the compiler replaces a call with the callee's body to improve performance.
Dynamic memory allocation: Happens at runtime when the program requests memory (for example via malloc or new); the compiler only generates code to perform allocations but does not allocate program data itself during compilation.
Summary: All listed activities except dynamic memory allocation are standard compile-time tasks; dynamic allocation occurs while the program runs.