Home » C++ Programming » Data Types » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    int main()
    {
    void num0 = 15, num1 = 16;
    int num2;
    num2 = num0 + num1;
    cout << num2;
    return 0;
    }
    1. 31
    2. Runtime Error
    3. Compile time Error
    4. All of above
    5. None of these
Correct Option: C

void will not accept any values to its type.



Your comments will be displayed only after manual approval.