113k views
2 votes
A(n) ________ is a name that represents a value that cannot be changed during the program's execution.

Answers:
a) Uninitialized variable
b) Named variable
c) Named constant
d) Input variable

1 Answer

6 votes

Final answer:

A named constant is a value that does not change during program execution, whereas variables can vary. Constants are used when a value is set once and does not need to be altered.

Step-by-step explanation:

A c) named constant is a name that represents a value that cannot be changed during the program's execution. Unlike a variable, which can vary during the course of a program, a named constant’s value is set at the time of declaration and cannot be altered while the program runs. For instance, you might declare a constant for the value of pi in a mathematical program because this value will not change.

User Alireza Farahani
by
7.5k points