what is the different between if-else and switch statment
(other than syntax)
Answer Posted / vikky
expressions cannot be used as arguments in switsh, but in
if else any kind of exp can be used...
in the case of checkin a single variable for several values
SWITCH is the BEST.
in all other cases if else holds gud.
| Is This Answer Correct ? | 36 Yes | 20 No |
Post New Answer View All Answers
Can a function argument have default value?
What's the right way to use errno?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
What are the rules for identifiers in c?
What is difference between structure and union?
How can you check to see whether a symbol is defined?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
What is function prototype?
What is the process to generate random numbers in c programming language?
How many bytes is a struct in c?
What are # preprocessor operator in c?
Is c dynamically typed?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
Ow can I insert or delete a line (or record) in the middle of a file?
What are compound statements?