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 does c in a circle mean?
write a program to find out prime number using sieve case?
What is operator promotion?
What is array of structure in c programming?
If the size of int data type is two bytes, what is the range of signed int data type?
What are the similarities between c and c++?
Explain what is a static function?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year
Do array subscripts always start with zero?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
How do we make a global variable accessible across files? Explain the extern keyword?
How to compare array with pointer in c?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
Explain which function in c can be used to append a string to another string?
Why array is used in c?