what is the different between if-else and switch statment
(other than syntax)
Answer Posted / ailyn
Difference between switch - case and if - else is
we can't compare variables.
in the if - else, first the condition is verified,then it
comes to else whereas in the switch - case first it checks
the cases and then it switches to that particular case.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
How can you increase the size of a statically allocated array?
What is an auto keyword in c?
Is c easy to learn?
Explain how do you list files in a directory?
Explain the term printf() and scanf() used in c language?
What is the -> in c?
Explain what is the difference between functions abs() and fabs()?
What is structure packing in c?
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
Explain how can I prevent another program from modifying part of a file that I am modifying?
What is uint8 in c?
What are examples of structures?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
List some of the static data structures in C?
Is that possible to add pointers to each other?