1

What is the output of following code? #include using namespace std; int main() { int I; enum test { a = 1, b, c, d, e, f, g, h }; for (i = c; i <= g; i++) cout << " " << I; return 0; }

Correct Answer: 3 4 5 6 7

Make the most of this question

This page focuses on one Principles of Programming Languages question from Engineering. After checking the answer, return to the topic list to practice more or run a timed set.

Principles of Programming Languages MCQ: What is the output of following code? #include using namespace std; int main() { int I; enum test { a = 1, b, c, d, e, f, g, h }; for (i = c; i <= g; i++) cout << " " << I; return 0; } | Extra Education