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
πŸ’¬ Discuss
βœ… Correct Answer: (C) syntax error

You must be Logged in to update hint/solution

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
480
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
89%
Success Rate