Question 7
Back to Exercise
What is the output of the following C program on a 64-bit system?
#include <stdio.h>
enum level { LOW = 1, MID, HIGH = 10, MAX };
int main(void) {
printf("%d %d %d\n", MID, HIGH, MAX);
return 0;
}
- A 2 10 11 Correct
- B 1 10 11
- C 2 3 4
- D 2 10 3
Correct Answer: Option A
A constant without a value is one more than the previous: MID = 2 and MAX = 11.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!