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 difference between class and unio?
Can variables be declared anywhere in c?
Why is c platform dependent?
Why void main is used in c?
What is dynamic variable in c?
Is register a keyword in c?
What is typedef?
What is the purpose of ftell?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
How can you convert integers to binary or hexadecimal?
What is time null in c?
simple program of graphics and their output display
Can a file other than a .h file be included with #include?
What is ## preprocessor operator in c?
What is the use of a conditional inclusion statement in C?