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
Answers were Sorted based on User's Feedback
Answer / bhavani
ans:6
becz feb=4 tthen apr=5 so may :6
enum takes next contious values
| Is This Answer Correct ? | 25 Yes | 2 No |
Answer / saketh
Answer is :6,
solution:
enum is the variable that stores the values in a contiguous manner if they are not initilised with any values...
so,apr=5,may=6;
| Is This Answer Correct ? | 14 Yes | 2 No |
How can I read a directory in a C program?
2 Answers Bright Outdoor, Wipro,
What is echo in c programming?
What are the various topologies? Which one is the most secure?
Why do we use static in c?
Differentiate between Macro and ordinary definition.
Explain the priority queues?
Why data types in all programming languages have some range? Why ritche have disigned first time likethat?Why not a single data type can support all other types?
void main(int argc,char *argv[],char *env[]) { int i; for(i=1;i<argc;i++) printf("%s",env[i]); }
What is the output of the program #include<stdio.h> #include<conio.h> void main() {0 int i,j=20; clrscr(); for(i=1;i<3;i++) { printf("%d,",i); continue; printf("%d",j); break; } getch(); }
#include<stdio.h> int main() { int i=2; int j=++i + ++i + i++; printf("%d\n",i); printf("%d\n",j); }
Is it possible to use curly brackets ({}) to enclose single line code in c program?
How can I write a function analogous to scanf?