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

Write a program to use switch statement.

0 Answers   Agilent, Integreon, ZS Associates,


What is the difference between #include <header file> and #include “header file”?

0 Answers  


what would be the output of the follwing struct st { char name[20]; int i; float f; }; main() { struct st emp = {"forum"}; printf("%d %f",emp.i,emp.f); }

4 Answers  


Explain what are header files and explain what are its uses in c programming?

0 Answers  


sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2; Find the value of x?

4 Answers   Subex,






write a c program to print a given number as odd or even without using loop statements,(no if ,while etc)

10 Answers  


What is the scope of an external variable in c?

0 Answers  


Write a C Program to display the following menu: Menu 1. Display 2. Copy 3. Append 4. Exit Accept the choice (1-4) from the user, and perform the following tasks: Choice 1: Accept a file name from the user and display the file on screen Choice 2: Accept two file names, and copy first file to the second Choice 3: Accept two file names, and append second file to the first file Choice 4: Terminate the program

1 Answers   Accenture, Concor, DMU, Satyam, Syntel, Tora,


In a header file whether functions are declared or defined?

0 Answers   TISL,


explain what is fifo?

0 Answers  


How is a pointer variable declared?

0 Answers  


What does the message "warning: macro replacement within a string literal" mean?

1 Answers  


Categories