A

Admin • 833K Points
Coach

Q. What will be the output of the following C function?

Code:
#include <stdio.h>
enum birds {SPARROW, PEACOCK, PARROT};
enum animals {TIGER = 8, LION, RABBIT, ZEBRA};
int main()
{
enum birds m = TIGER;
int k;
k = m;
printf("%d
", k);
return 0;
}
  • (A) 0
  • (B) Compile time error
  • (C) 1
  • (D) 8
  • Correct Answer - Option(D)
  • Views: 18
  • Filed under category C Programming
  • Hashtags:

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.

Be the first to start discuss.