Examveda

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
    void a = 10, b = 10;
    int c;
    c = a + b;
    cout << c;
    return 0;
}

A. 20

B. compile time error

C. runtime error

D. 40

Answer: Option B


Join The Discussion

Related Questions on Variables and Data Types in C plus plus