Examveda

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
enum  cat 
{
    temp = 7
};
int main()
{
    int age = 14;
    age /= temp;
    cout << "If you were cat, you would be " << age << endl;
    return 0;
}

A. If you were cat, you would be 5

B. If you were cat, you would be 2

C. If you were cat, you would be 7

D. If you were cat, you would be 9

Answer: Option B


Join The Discussion

Related Questions on Variables and Data Types in C plus plus