M

Mr. Dubey • 100.64K Points
Coach

Q. What will be the output of following code? #include <iostream> using namespace std;

int main()
{
enum color
{
blue, orange, green
};

enum fruit
{
apple, guava, orange
};

int i = 0;
for (i = blue; i <= green; i++)
printf("%d", i);
return 0;
}

  • (A) 0 1 2
  • (B) 1 2 3
  • (C) syntax error
  • (D) none of these
Share

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics