what is the different between if-else and switch statment
(other than syntax)
Answer Posted / fazlur rahaman naik
The main difference between switch - case and if - else is
we can't compare variables.
in the if - else, first the condition is verified,then it
comes to else whereas in the switch - case first it checks
the cases and then it switches to that particular case.
| Is This Answer Correct ? | 168 Yes | 35 No |
Post New Answer View All Answers
What is a char c?
What does volatile do?
What is pivot in c?
What is abstract data structure in c?
How can you pass an array to a function by value?
What is structure padding and packing in c?
Explain the difference between strcpy() and memcpy() function?
Why does the call char scanf work?
How #define works?
How does normalization of huge pointer works?
differentiate built-in functions and user – defined functions.
Explain what is the general form of a c program?
Differentiate between a for loop and a while loop? What are it uses?
What are the standard predefined macros?
Explain the ternary tree?