enum
{
SUNDAY,
MONDAY,
TUESDAY,
}day;
main()
{
day =20;
printf("%d",);
getch();
}
what will be the output of the above program
Answer Posted / 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 View All Answers
Why is sizeof () an operator and not a function?
How does #define work?
There seem to be a few missing operators ..
What is a protocol in c?
where are auto variables stored? What are the characteristics of an auto variable?
Is array a primitive data type in c?
Is exit(status) truly equivalent to returning the same status from main?
Differentiate call by value and call by reference?
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
what is the height of tree if leaf node is at level 3. please explain
The __________ attribute is used to announce variables based on definitions of columns in a table?
How can I make sure that my program is the only one accessing a file?
Explain the difference between the local variable and global variable in c?
what is the difference between class and unio?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }