what is the different between if-else and switch statment
(other than syntax)
Answer Posted / mohemmed bilal
main difference between both statement is that we can only
use switch for one variable eg
switch(x)
{
case 1://do this;
case 2://do this;
case 3://do this;
}
while in if else we can use multiple condition like
if(x==0&&y==0)
{
printf("");
}
else if(x==1&&y==0)
{
printf("");
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which is best book for data structures in c?
Explain what is a 'locale'?
Is main a keyword in c?
number of times a digit is present in a number
will u please send me the placement papers to my mail???????????????????
Write a program to print fibonacci series without using recursion?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
Tell me what is the purpose of 'register' keyword in c language?
How can I remove the leading spaces from a string?
How to create struct variables?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
Function calling procedures? and their differences? Why should one go for Call by Reference?
Explain about C function prototype?
Is Exception handling possible in c language?