what is the different between if-else and switch statment
(other than syntax)
Answer Posted / nilesh dinakr
In IF STATEMENT, we can build the logical conditin i.e.
usinf realtional operator but in SWITCH, we can use the
expression which yield int or char value but not float.
char value will be auoto typecast to int. shortly , switch
works only one int
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
Define macros.
What is difference between function overloading and operator overloading?
What is n in c?
What does the c in ctime mean?
What is data type long in c?
What is scope rule in c?
can any one tel me wt is the question pattern for NIC exam
What are loops in c?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
What are header files why are they important?
What is the use of ?
pierrot's divisor program using c or c++ code
When should the const modifier be used?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?