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
Answer» C. syntax error
710
0
Do you find this helpful?
1

Discussion

No comments yet