21. Which of the following statement is false
(A) Constant variables need not be defined as they are declared and can be defined later
(B) Global constant variables are initialized to zero
(C) const keyword is used to define constant values
(D) You cannot reassign a value to a constant variable
Answers
Answer:
Answer is A
Explanation:
(A) Constant variables need not be defined as they are declared and can be defined later
Answer:
The correct answer to the given question is:
(A) Constant variables need not be defined as they are declared and can be defined later
Explanation:
Variables are scalar storage locations where data values can be stored. When you declare or initialize a variable, you must give it a unique name so that you can access it. The
constant does not change over time and has a fixed value. This is something that cannot be updated or changed anywhere in the program. Constant variables must be initialized at the time of declaration. In algebraic expressions, x + y = 8 and 8 are constant values and cannot be changed.
To declare a constant variable in C ++, put the keyword const before the variable's data type. Constant variables can be declared for any data type such as int, double, char, or string.
#SPJ2