MCQs
Total Questions : 9
Answer: Option A. -> L prefix
It can turn this as wide character instead of narrow characters.
Answer: Option A. -> The first one refers to a variable whose identifier is x and the second one refers to the character constant x
None.
Answer: Option C. -> Declares a constant a whose value will be 100
Because the const is used to declare non-changable values only.
Answer: Option D. -> They end with a semicolon
None.
Answer: Option A. -> 12.5664
In this program, we are finding the area of the circle by using concern formula.
Output:
$ g++ cons.cpp
$ a.out
12.5664
Answer: Option C. -> Error
We cannot modify a constant integer value.
Answer: Option D. -> all of the mentioned
Because these are the types used to declare variables and so these can be declared as constants.
Answer: Option C. -> both a and b
The const will declare with a specific type values and #define is used to declare user definied
constants.