Home » C++ Programming » Operators » Question
  1. What is the output of this program?
    #include <iostream> 
    using namespace std;
    int main()
    {
    int num = 15;
    int Res ;
    Res = num++;
    cout << Res;
    return 0;
    }
    1. 16
    2. 15
    3. 14
    4. Compilation Error
    5. None of these
Correct Option: B

value of ‘num’ will be stored in Res and then only it will be incremented.



Your comments will be displayed only after manual approval.