Examveda

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
    int i;
    enum month 
    {
        JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,DEC
    };
    for (i = JAN; i <= DEC; i++)
        cout << i;
    return 0;
}

A. 012345678910

B. 0123456789

C. 01234567891011

D. 01234567891011122

Answer: Option A


Join The Discussion

Related Questions on Classes and Objects in C plus plus