Examveda

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
enum colour 
{
    green, red, blue, white, yellow, pink
};
int main()
{
    cout << green<< red<< blue<< white<< yellow<< pink;
    return 0;
}

A. 012345

B. 123456

C. compile time error

D. runtime error

Answer: Option A


Join The Discussion

Related Questions on Variables and Data Types in C plus plus