enum day = { jan = 1 ,feb=4, april, may}
what is the value of may?
a)4 b)5 c)6 d)11
e)none of the above

Answer Posted / yash

ans is:6
becase enum takes contiguous values

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an lvalue in c?

703


Can you please compare array with pointer?

625


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

602


What is the main difference between calloc () and malloc ()?

582


Can we increase size of array in c?

550






What is calloc() function?

631


How do you construct an increment statement or decrement statement in C?

753


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include #include #include #include int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

1626


What are the advantages of c preprocessor?

724


hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .

1911


Write the test cases for checking a variable having value in range -10.0 to +10.0?

1829


Write a program to generate random numbers in c?

670


Why does everyone say not to use scanf? What should I use instead?

687


Do character constants represent numerical values?

852


What is omp_num_threads?

590