+ 1
Why the keyboard 'const double' not 'const'?
4 Réponses
+ 2
You need to specify that what type of data is going to be constant. For eg-
const int x = 10;
const double y = 22.45;
0
Constants
A constant stores a value that cannot be changed from its initial assignment.
By using constants with meaningful names, code is easier to read and understand.
To distinguish constants from variables, a common practice is to use uppercase identifiers.
One way to define a constant is by using the const keyword in a variable declaration:
》》》I am asking about this constant
but in code... const double.. is used
0
shridhar w that's what I have mentioned, you can create constants like that and their value cannot be altered in the code. For eg take the value of PI which is a constant.
0
Yeah😅😅
Understood....
You need to specify data type whichs going to be constant.