Which is the correct technique to declare a constant in C?
A. int constant var =10;
B. int const var = 10;
C. const int var = 10;
D. Both D. B. and C.
Answer:D
Which is the correct technique to declare a constant in C?
A. int constant var =10; B. int const var = 10; C. const int var = 10; D. Both D. B. and C.
Explanation: int const var = 10;const int var = 10; are the correct ways to declare constants in C.