Single Choice Not Set

QWhat is the output of this code?

   #include <stdio.h>
    int main()
    {
        enum {INDIA = 6, USA, UK = 8, CANADA};
        printf("CANADA = %d\n", CANADA);
    }

ID: #1136 Constant in C Language 1,143 views
Question Info
#1136Q ID
Not SetDifficulty
Constant in C LanguageTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A CANADA = 7
  • B CANADA = 9
  • C CANADA = 3
  • D CANADA = 5
Correct Answer

Explanation

In enum, the value of constant is defined to the recent assignment from left.

CANADA = 9
No Previous Next Question

Share This Question

Challenge a friend or share with your study group.