Important MCQ

const double PI = 3.14; PI = 3.15; causes

Q.const double PI = 3.14; PI = 3.15; causes

A) a compile error
B) the program to run twice
C) PI becomes 3.15
D) PI becomes 3.14 and 3.15
Correct Answer:
Option A
Detailed Explanation:
A) a compile error is correct. C++ declarations use the data type before the variable name. Integer division drops the fractional part, character codes can be converted to integers, and constants cannot be changed.