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 many types of operators are there in c?

996


What is the code in while loop that returns the output of given code?

1926


What are header files why are they important?

1059


Describe the difference between = and == symbols in c programming?

1316


How can I find the modification date of a file?

1236


What do you mean by c what are the main characteristics of c language?

994


What is a union?

995


How can I read a binary data file properly?

1104


I heard that you have to include stdio.h before calling printf. Why?

1018


What is meant by preprocessor in c?

968


What is far pointer in c?

1250


where are auto variables stored? What are the characteristics of an auto variable?

1026


Why is it important to memset a variable, immediately after allocating memory to it ?

2021


Is main is user defined function?

1085


how to execute a program using if else condition and the output should enter number and the number is odd only...

2229