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...

In the following control structure which is faster?
1.Switch
2.If-else
and which consumes more memory?

Answer Posted / deepak upadhyay

switch statement is more faster and consumes less memory
than if-else statement the reason being that the switch
statement is applied when we have a single variable to
check but in case of if-else different variable may be
checked at the same time.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2451


Why does this code crash?

1105


What is sorting in c plus plus?

982


Can you explain the four storage classes in C?

1128


Can you mix old-style and new-style function syntax?

1104


‎How to define structures? · ‎

1093


What is Dynamic memory allocation in C? Name the dynamic allocation functions.

1419


What does nil mean in c?

1276


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

1148


Can 'this' pointer by used in the constructor?

1099


What is a void * in c?

1081


What's the total generic pointer type?

1061


How can I ensure that integer arithmetic doesnt overflow?

1177


What are the ways to a null pointer can use in c programming language?

1139


write a progrmm in c language take user interface generate table using for loop?

2055