...

/

Quiz on Enumeration

Quiz on Enumeration

Check your understanding of enumeration by completing this quiz.

Technical Quiz
1.

What will be the output of the following program:

# include <stdio.h> 
int main( )
{
enum grade { Agrade, Bgrade, Cgrade } ;
enum grade  stud1, stud2, stud3 ;
stud1 = Agrade ;
stud2 = Bgrade ;
stud3 = Cgrade;
printf ( "%d %d %d\n", stud1, stud2, stud3 ) ;
return 0 ;
}
A.

0 1 2

B.

Agrade Bgrade Cgrade

C.

Error: Cannot print enum elements using %d


1 / 5