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 can I find out how much free space is available on disk?
What is stack in c?
What is the use of parallelize in spark?
How can I open a file so that other programs can update it at the same time?
How to declare pointer variables?
Why should I use standard library functions instead of writing my own?
What is typeof in c?
Is printf a keyword?
What do mean by network ?
Explain what is meant by high-order and low-order bytes?
Explain how are 16- and 32-bit numbers stored?
What are the Advantages of using macro
What does typedef struct mean?
What the advantages of using Unions?
What is an auto keyword in c?