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
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What does %p mean c?
What does it mean when a pointer is used in an if statement?
What is the best style for code layout in c?
What is c standard library?
What are terms in math?
Is a pointer a kind of array?
What are high level languages like C and FORTRAN also known as?
How many types of sorting are there in c?
Why is sizeof () an operator and not a function?
What is c system32 taskhostw exe?
What is the difference between single charater constant and string constant?
What is the difference between malloc calloc and realloc in c?
How important is structure in life?
What is the difference between int main and void main?