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 / fazlur rahaman naik

The main difference between switch - case and if - else is
we can't compare variables.

in the if - else, first the condition is verified,then it
comes to else whereas in the switch - case first it checks
the cases and then it switches to that particular case.

Is This Answer Correct ?    168 Yes 35 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

1109


The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?

1215


Is c high or low level?

1015


how to capitalise first letter of each word in a given string?

1931


What is the purpose of 'register' keyword?

1103


Explain how can you determine the size of an allocated portion of memory?

1118


How can I delete a file?

1071


What do you mean by a local block?

1088


What is assignment operator?

1063


Is javascript written in c?

1071


Explain the use of 'auto' keyword in c programming?

1122


Do you have any idea how to compare array with pointer in c?

1055


What does c mean?

1059


What are the advantages and disadvantages of pointers?

1075


What are bitwise shift operators in c programming?

1090