Asked by Thembani VUTUZA on May 17, 2024

verifed

Verified

Which of the following statements about a named constant is NOT true?

A) Its content cannot change during program execution.
B) Its value can be changed during program execution.
C) It is a memory location.
D) It is declared using the reserved word final.

Named Constant

A variable whose value is initialized at the time of declaration and cannot be changed during the program's execution, used to make code more readable and maintainable.

Program Execution

The process by which a computer runs the instructions in a program or script, translating them into machine-level commands to be performed.

  • Distinguish between mutable and immutable data types, and understand the concept of named constants.
verifed

Verified Answer

JP
Jashan preetMay 21, 2024
Final Answer :
B
Explanation :
A named constant, by definition, cannot have its value changed during program execution. This is the main feature that distinguishes it from a variable. Therefore, statement B is not true. The other statements are all true: a named constant's content cannot change during program execution, it is a memory location, and it is declared using the reserved word final.