Difficulty: Easy
Correct Answer: 128
Explanation:
Introduction / Context:The const qualifier stops further mutation through the declared name, but it does not alter the stored value at initialization. Assigning or initializing a const from an ordinary variable is routine and results in an independent read-only object that holds the copied value at that moment. This question reinforces that constness affects mutability, not representable values or printing behavior.
Given Data / Assumptions:
Concept / Approach:
Step-by-Step Solution:
Compute initial state: y holds 128.Initialize const int x with y → x = 128.Print x → output 128.Verification / Alternative check:
Changing y later would not affect x; x remains 128 since it is a distinct object.Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
128
Discussion & Comments