enum
{
SUNDAY,
MONDAY,
TUESDAY,
}day;
main()
{
day =20;

printf("%d",);
getch();
}
what will be the output of the above program



enum { SUNDAY, MONDAY, TUESDAY, }day; main() { day =20; printf("%d",); ..

Answer / shrikant auti

If u observe the program carefully,you will come to know
ther is syntax error.
enum
{
SUNDAY,
MONDAY,
TUESDAY,
}day;
main()
{
day =20;

printf("%d",);//printf("%d",) error maker
getch();
}

If u put it
printf("%d",day);
then it will print 20 because 20 is the latest value
assigned for day.

Is This Answer Correct ?    8 Yes 0 No

Post New Answer

More C Interview Questions

Tell me with an example the self-referential structure?

0 Answers  


write a program to print calender using for loop.

1 Answers   HCL, TCS,


Why clrscr is used after variable declaration?

0 Answers  


how to find anagram without using string functions using only loops in c programming

1 Answers   Mind Tree, TCS,


In how much time you will write this c program? Prime nos from 1 to 1000

2 Answers   TCS,






how to make a scientific calculater ?

0 Answers  


Write a programe print the sum of series 0,1,2,.....10

7 Answers  


write a program for even numbers?

19 Answers   TCS,


What is struct node in c?

0 Answers  


What are the different types of pointers used in c language?

0 Answers  


What are the standard predefined macros?

0 Answers  


What is auto keyword in c?

0 Answers  


Categories