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

Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

0 Answers   Amazon,


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

0 Answers   Infosys, Wipro,


Where in memory are my variables stored?

0 Answers  


What is Generic pointer? What is the purpose of Generic pointer? Where it is used?

3 Answers  


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

0 Answers  






wap in c to accept a number display the total count of digit

4 Answers  


Consider the following C program. #include <stdio.h> int main() { int i; for (i=0;i<3;++i) { fork();fork(); } } How many processes are created when running this program (including the initial one)? Explain

2 Answers  


plz answer.... write a program that reads line (using getline) e.g."345", converts each line to an integer using "atoi" and computes the average of all the numbers read. also compute the standard deviation.

1 Answers  


write an interactive program to generate the divisors of a given integer.

7 Answers   TCS,


How does placing some code lines between the comment symbol help in debugging the code?

0 Answers  


What is the purpose of macro in C language?

0 Answers   Fidelity,


Explain what is a const pointer?

0 Answers  


Categories