Which of the following statements about constant propagation is correct?
2025
Which of the following statements about constant propagation is correct?
Answer: C. It can lead to further optimizations like dead code elimination. — Constant propagation replaces variables with their known constant values, enabling optimizations like dead code elimination.
- A.
It applies only to loop variables.
- B.
It eliminates all unused variables.
- C.
It can lead to further optimizations like dead code elimination.
- D.
It increases code size.
Attempted by 64 students.
Show answer & explanation
Correct answer: C
Constant propagation replaces variables with their known constant values, enabling optimizations like dead code elimination.
Loading lesson…