Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

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?

2218


Can you subtract pointers from each other? Why would you?

1010


What is the usage of the pointer in c?

1201


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

1134


What does & mean in scanf?

1168


how logic is used

2027


Why do some versions of toupper act strangely if given an upper-case letter?

1117


Why structure is used in c?

1240


Hi can anyone tell what is a start up code?

2140


Where can I get an ansi-compatible lint?

1208


What is getche() function?

1090


What is %g in c?

1122


Why c is called procedure oriented language?

1109


Explain what are the different data types in c?

1271


Write a Program to find whether the given number or string is palindrome.

1344