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
Are there any problems with performing mathematical operations on different variable types?
What is extern c used for?
What are the functions to open and close the file in c language?
What is pre-emptive data structure and explain it with example?
What are pointers in C? Give an example where to illustrate their significance.
What is an lvalue?
What is a pointer in c plus plus?
Why does not c have an exponentiation operator?
Do you know pointer in c?
What is difference between structure and union in c programming?
Where in memory are my variables stored?
Sir i need notes for structure,functions,pointers in c language can you help me please
program for reversing a selected line word by word when multiple lines are given without using strrev
What are lookup tables in c?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321