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
What is a char in c?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
What is an auto keyword in c?
Why can’t we compare structures?
What does the function toupper() do?
Write a program to swap two numbers without using the third variable?
What are enumerated types?
What is variable initialization and why is it important?
can we have joblib in a proc ?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is break statement?
What is type qualifiers?
What do you mean by scope of a variable in c?
What is the use of a semicolon (;) at the end of every program statement?