Vidyalelo
C++ Programming · Q101

Variables and Data Types in C++

Programming · C++ Programming · question 101

Q101

What will be the output of the following C++ code? #include 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
Answer
C.
If you were cat, you would be 7
D.
If you were cat, you would be 9

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board