Home » C++ Programming » Basic Input/Output » Question
  1. What is the output of this program?
    #include <iostream>
    using namespace std;
    int main ()
    {
    int num;
    cout << "Please enter a Number: ";
    cin >> num + 10;
    return 0;
    }
    1. Please enter a Number
    2. 10
    3. 15
    4. Compilation Error
    5. Runtime Error
Correct Option: D

We are not allowed to do addition operation on cin.



Your comments will be displayed only after manual approval.