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

How can I find out how much free space is available on disk?

1055


What is stack in c?

1077


What is the use of parallelize in spark?

1029


How can I open a file so that other programs can update it at the same time?

1181


How to declare pointer variables?

1239


Why should I use standard library functions instead of writing my own?

1268


What is typeof in c?

1009


Is printf a keyword?

1196


What do mean by network ?

1160


Explain what is meant by high-order and low-order bytes?

1046


Explain how are 16- and 32-bit numbers stored?

1266


What are the Advantages of using macro

1166


What does typedef struct mean?

1105


What the advantages of using Unions?

1229


What is an auto keyword in c?

1096