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 are multidimensional arrays?
What is the 'named constructor idiom'?
why programs in c are running with out #include
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
How arrays can be passed to a user defined function
What are the advantages and disadvantages of c language?
What the advantages of using Unions?
develop algorithms to add polynomials (i) in one variable
What is the collection of communication lines and routers called?
What is hash table in c?
Is there a way to compare two structure variables?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
What is the difference between the expression “++a” and “a++”?
What are different storage class specifiers in c?
What are the different types of objects used in c?