Question
1.
#include
2.
using namespace std;
3.
enum test {
4.
A = 32, B, C
5.
};
6.
int main()
7.
{
8.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
enum test {
4.
A = 32, B, C
5.
};
6.
int main()
7.
{
8.
cout
Answer: Option A
Was this answer helpful ?
If we not assigned any value to enum variable means, then the next number to initialized number will
be allocated to the variable.
Output:
$ g++ enum2.cpp
$ a.out
323334
Was this answer helpful ?
More Questions on This Topic :
Question 6.
Identify the incorrect option.
....
Submit Solution