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
What is the use of getch ()?
Where are some collections of useful code fragments and examples?
Write a program to reverse a linked list in c.
What is a sequential access file?
What are the complete rules for header file searching?
Write a program to find factorial of a number using recursive function.
How to declare pointer variables?
What is void main ()?
How can I copy just a portion of a string?
Why is %d used in c?
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
Why is c not oop?
Explain how do you generate random numbers in c?
How can you find out how much memory is available?
Lists the benefits of c programming language?