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


Please Help Members By Posting Answers For Below Questions

What is the time and space complexities of merge sort and when is it preferred over quick sort?

676


How do I create a directory? How do I remove a directory (and its contents)?

608


What does != Mean in c?

592


Which is more efficient, a switch statement or an if else chain?

584


difference between native and cross compilers

1672






What are the types of c language?

560


Write a program to print fibonacci series using recursion?

587


What are c identifiers?

629


The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

2938


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

679


Write a code of a general series where the next element is the sum of last k terms.

596


List the variables are used for writing doubly linked list program.

1625


Can one function call another?

628


What was noalias and what ever happened to it?

592


Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

1597