Home » C++ Programming » Constants/Literals » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    int main()
    {
    int const num = 10;
    cout << ++num;
    return 0;
    }
    1. 10
    2. Garbage value
    3. Compilation Error
    4. Runtime Error
    5. None of these
Correct Option: C

We cannot modify a constant integer value.



Your comments will be displayed only after manual approval.