Question
1.
#include
2.
using namespace std;
3.
enum colour {
4.
green, red, blue, white, yellow, pink
5.
};
6.
int main()
7.
{
8.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
enum colour {
4.
green, red, blue, white, yellow, pink
5.
};
6.
int main()
7.
{
8.
cout
Answer: Option A
Was this answer helpful ?
The enumerator values start from zero if it is unassigned.
Output:
$ g++ enum3.cpp
$ a.out
012345
Was this answer helpful ?
More Questions on This Topic :
Question 8.
Identify the incorrect option.
....
Submit Solution