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 / ananth kumar

switch has its own pros and cons,

Favours coding style.
From performance point, switch case creates table. It
directly jumps to the required location based on table
contents.

If-else is hard for code-walk
Optimised (please check).

Is This Answer Correct ?    44 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are there any problems with performing mathematical operations on different variable types?

1104


What is extern c used for?

1119


What are the functions to open and close the file in c language?

1085


What is pre-emptive data structure and explain it with example?

3788


What are pointers in C? Give an example where to illustrate their significance.

1272


What is an lvalue?

1107


What is a pointer in c plus plus?

1384


Why does not c have an exponentiation operator?

1115


Do you know pointer in c?

1107


What is difference between structure and union in c programming?

1174


Where in memory are my variables stored?

1246


Sir i need notes for structure,functions,pointers in c language can you help me please

2459


program for reversing a selected line word by word when multiple lines are given without using strrev

2536


What are lookup tables in c?

1033


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3783