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
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 |
Difference between Class and Struct.
13 Answers Ericsson, Motorola, Wipro,
What is a buffer in c?
what is level of tree if leaf node is at level 4.please explain.
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
main() { FILE *fs; char c[10]; fs = fopen(“source.txt”, ”r”); /* source.txt exists and contains “Vector Institute” */ fseek(fs,0,SEEK_END); fseek(fs,-3L,SEEK_CUR); fgets(c,5,fs); puts(c); }
what is the use of #pragma pack, wer it is used?
Write a program on swapping (100, 50)
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
If errno contains a nonzero number, is there an error?
What is use of integral promotions in c?
int main() { int x = (2,3,4); int y = 9,10,11; printf("%d %d",x,y); } what would be the output?
How to create struct variables?