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
Can you subtract pointers from each other? Why would you?
What is derived datatype in c?
In c language can we compile a program without main() function?
Why is structure important for a child?
What is the method to save data in stack data structure type?
What is c++ used for today?
What are identifiers c?
What is realloc in c?
Why doesnt that code work?
When a c file is executed there are many files that are automatically opened what are they files?
Is c call by value?
What is a const pointer?
what does static variable mean?
What is structure pointer in c?
Write a program to check armstrong number in c?