Examveda

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
    typedef int num;
    typedef char let;
    let w = "steve";
    num a = 10, b = 15;
    num c = a + w;
    cout << c;
    return 0;
}

A. 10steve

B. steve10

C. compile time error

D. compile but not run

Answer: Option C


Join The Discussion

Related Questions on Classes and Objects in C plus plus