what is the different between if-else and switch statment
(other than syntax)
Answer Posted / ananth kumar
switch has its own pros and cons,
Favours coding style.
From performance point, switch case creates table. It
directly jumps to the required location based on table
contents.
If-else is hard for code-walk
Optimised (please check).
| Is This Answer Correct ? | 44 Yes | 21 No |
Post New Answer View All Answers
How many types of operators are there in c?
What is the code in while loop that returns the output of given code?
What are header files why are they important?
Describe the difference between = and == symbols in c programming?
How can I find the modification date of a file?
What do you mean by c what are the main characteristics of c language?
What is a union?
How can I read a binary data file properly?
I heard that you have to include stdio.h before calling printf. Why?
What is meant by preprocessor in c?
What is far pointer in c?
where are auto variables stored? What are the characteristics of an auto variable?
Why is it important to memset a variable, immediately after allocating memory to it ?
Is main is user defined function?
how to execute a program using if else condition and the output should enter number and the number is odd only...