suppose we use switch statement and we intilize years name
using enum statement like(jan,feb,mar,------dec) we take
integer value as an input .question is that the month which
we analyz is from 0 to 11 bt if i enter 12 than how he
again starts from begning and print jan
Answer Posted / vignesh1988i
enum is a special datatype , whatever we have intilized under enum only we can able to use in our program , hope so ur program contains only enum datatype from that u are giving value for each month through switch case......
so here wat i think is that after u give 11, ie 12th month since u are starting from 0 , if u give 12 inside enum , only 12 entries are there and already u have made use of it.... so again it will start from january only.......
thank u
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How are Structure passing and returning implemented by the complier?
How can a string be converted to a number?
What is abstract data structure in c?
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What are the types of pointers?
What is the sizeof () a pointer?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
What does c value mean?
What is the difference between far and near in c?
What are all different types of pointers in c?
What are the advantages of the functions?
Define VARIABLE?
Is it valid to address one element beyond the end of an array?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none