Computer Programming (COPROG) Practice Test

Access More Questions
In a constant declaration, which part is the data type?
Correct Answer:
dataType
Explanation:
The data type is the type specifier that tells what kind of value the constant holds. It appears before the constant’s name, such as in a declaration like const int MAX = 100, where int is the data type. The name is the identifier you use to reference the constant, and the value is the literal assigned to initialize it. The access specifier, if present, controls visibility but is not the data type. So the data type is the part that specifies the kind of data stored by the constant.

Access more questions from this quiz

Continue to Computer Programming (COPROG) Practice Test for more practice questions and the full quiz experience.

Access More Questions