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
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
Can you subtract pointers from each other? Why would you?
What is the usage of the pointer in c?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
What does & mean in scanf?
how logic is used
Why do some versions of toupper act strangely if given an upper-case letter?
Why structure is used in c?
Hi can anyone tell what is a start up code?
Where can I get an ansi-compatible lint?
What is getche() function?
What is %g in c?
Why c is called procedure oriented language?
Explain what are the different data types in c?
Write a Program to find whether the given number or string is palindrome.