Important MCQ

A main benefit of constants is

Q.A main benefit of constants is

A) more errors
B) avoiding accidental change of fixed values
C) hiding variables
D) slower programs
Correct Answer:
Option B
Detailed Explanation:
B) avoiding accidental change of fixed values is correct. A constant has a fixed value. const variables must be initialized when declared and cannot be reassigned; #define is a preprocessor directive and has no trailing semicolon.