enum DAY
{
sunday,
monday,
tuesday
};

enum EDAYS
{
friday,
saturday,
sunday
};

void main()
{
int i =0;
if( i == sunday)
{
printf("%d",i);
}
}
what would be the output?

Answer Posted / mukesh_biswajeet

The Answer or output is 0
Sunday is at zero[0] positon in Enum Day
and therefore the condition becomes true and
the initialised value of i is printed.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

1559


What is pre-emptive data structure and explain it with example?

3194


a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

704


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

762


Why is struct padding needed?

619






Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

636


What is a program?

644


I need a sort of an approximate strcmp routine?

645


hi, which software companys will take,if d candidate's % is jst 55%?

1642


Can include files be nested? How many levels deep can include files be nested?

641


What is array of structure in c?

578


This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory

717


What is getch c?

841


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

656


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

1240