Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
enum test
{
A = 32, B, C
};
int main()
{
cout << A << B<< C;
return 0;
}

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
enum test
{
A = 32, B, C
};
int main()
{
cout << A << B<< C;
return 0;
}
a) 323334
b) 323232
c) 323130
d) 323134

Answer: a
Explanation: If we not assigned any value to enum variable means, then the next number to initialized number will be allocated to the variable.
Output:
323334

Join The Discussion