adplus-dvertising
frame-decoration

Question

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

a.

01234567891011

b.

123456789101112

c.

34567891011

d.

123456789

Answer: (c).34567891011

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is output of the this program?

Similar Questions

Discover Related MCQs

Q. Choose the correct option.

extern int i;
int i;

Q. Pick the right option:

Statement 1:A definition is also a declaration.
Statement 2:An identifier can be declared just once.

Q. Which of the given statements are false.

1. extern int func;
2. extern int func2(int,int);
3. int func2(int,int);
4. extern class foo;

Q. Pick the right option:

Statement 1:Global values are not initialized by the stream.
Statement 2:Local values are implicitly initialised to 0.

Q. Can two functions declare variables(non static) with the same name.

Q. Identify the incorrect statements.

int var = 10;
int *ptr = &(var + 1); //statement 1
int *ptr2 = &var; //statement 2
&var = 40; //statement 3

Q. Identify the type of the variables.

typedef char* CHAR;
CHAR p,q;

Q. Evaluate the following expression:
3 >6&&7>4

Q. Special data types that are defined by users is called

Q. In C++ the words that is already defined and is reserved for a single special purpose, is called as

Q. There are how many relational operator are offered by C++?

Q. Cin stands for

Q. Which from the following is not a relational operator?

Q. C++ allows objects of one type to be used in another type where it is expected, it is called as

Q. How many logical operators are combined to form a compound condition?

Q. Sequence of statements that is treated as a single statement, is called

Q. Which from the following is a relational operator?

Q. Conditional statements can be used within another conditional statements that are called

Q. The actual values defined in the enumeratorlist is called

Q. The logical symbol ! This is used for