what is the different between if-else and switch statment
(other than syntax)
Answer Posted / sherin
There are some things that you simply cannot do with a
switch. These are:
A float expression cannot be tested using a switch
Cases can never have variable expressions (for example it is
wrong to say case a +3 : )
Multiple cases cannot use same expressions.
| Is This Answer Correct ? | 17 Yes | 7 No |
Post New Answer View All Answers
What is 02d in c?
How is null defined in c?
What is the purpose of 'register' keyword in c language?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
Explain what is the difference between functions abs() and fabs()?
Explain how do you list a file’s date and time?
When is a null pointer used?
string reverse using recursion
In a switch statement, what will happen if a break statement is omitted?
What is the right type to use for boolean values in c? Is there a standard type?
What will the preprocessor do for a program?
Why can’t constant values be used to define an array’s initial size?
Compare array data type to pointer data type
What is a pragma?
What is the use of header files?