Top

Discussion

Which statment is true about the given code ?

#include 
enum colors {lets,find,course};
int main()
{
  printf("%d %d %d",course,lets,find);
  return 0;
}

 

  • A.3 1 2
  • B.0 1 2
  • C.2 0 1
  • D.1 0 2

Answer: C

enum assigns numbers starting from 0, if not explicitly defined by some other integer.

No comment is present. Be the first to comment.
Loading…

Post your comment