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



suppose we use switch statement and we intilize years name using enum statement like(jan,feb,mar,-..

Answer / 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

More C Interview Questions

Why doesn't the code "a[i] = i++;" work?

4 Answers  


Can i use “int” data type to store the value 32768? Why?

0 Answers  


how to use showbits function?

2 Answers   Infosys, TATA,


What is I ++ in c programming?

0 Answers  


How can I discover how many arguments a function was actually called with?

0 Answers  






In header files whether functions are declared or defined?

1 Answers   TCS,


What are c preprocessors?

0 Answers  


what is calloc and malloc?

2 Answers  


What is encapsulation?

2 Answers  


What is calloc in c?

0 Answers  


why r u join this company? give solid resons.

16 Answers   IBM, Infosys, TCS,


Which driver is a pure java driver

0 Answers   Vertex,


Categories