Beginner Compilers & Programming Language Theory
Q17 / 100

What is constant folding?

Correct! Well done.

Incorrect.

The correct answer is B) A compiler optimization evaluating constant expressions at compile time rather than runtime: 3*4 → 12

B

Correct Answer

A compiler optimization evaluating constant expressions at compile time rather than runtime: 3*4 → 12

Explanation

Constant folding: 3+4 → 7 at compile time. Combined with constant propagation (replace uses of constant variables with their values). Eliminates unnecessary computation.

Progress
17/100