what is the different between if-else and switch statment
(other than syntax)
Answer Posted / sumeet
IF ELSE- First the condition is verified, then it comes to the else part.
SWITCH CASE- First it checks the cases and then it switches to that particular case.
IF ELSE- It implements like binary search.
SWITCH CASE-
It implements binary search.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is structure in c definition?
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
What is c method?
How can I get back to the interactive keyboard if stdin is redirected?
What is the translation phases used in c language?
What is a macro in c preprocessor?
Explain what is a const pointer?
Explain what are multidimensional arrays?
Explain union. What are its advantages?
#include
How can you access memory located at a certain address?
When should you use a type cast?
Can you write a programmer for FACTORIAL using recursion?
Who invented b language?
What does c mean in basketball?