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 / battini.laxman

switch is faster because when in nested if condition has to
check for each time. where as in switch it diectly check
only labels.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are the __date__ and __time__ preprocessor commands?

1165


What is header file in c?

1114


Why flag is used in c?

1190


Explain what are global variables and explain how do you declare them?

1241


In a switch statement, what will happen if a break statement is omitted?

1123


What is meant by realloc()?

1205


What is the easiest sorting method to use?

1254


What is action and transformation in spark?

1233


What are the complete rules for header file searching?

1135


List some of the static data structures in C?

1245


Is Exception handling possible in c language?

2105


What is auto keyword in c?

1255


Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

1776


What is the difference between arrays and pointers?

1179


Between macros and functions,which is better to use and why?

2330