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

there is two conditions ,

1. while using for loop for printing 1 to 50 no's simulteneous
2. while using printf functios for printing 1 to 50 no's simulteneous with or without using variables

who will take more time for compiling and execution?
explain in details with reason?

Answer Posted / avanish pal

For loop will take more time for compiling and execution
because when we execute the program, flow of control frist
print 1 and after that returns to the condition and than
printed 2 this process repeated 50 times where as in simple
printf it straight print all numbers.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a function method?give example?

2310


What is data structure in c language?

1055


What is the benefit of using #define to declare a constant?

1043


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

1090


what are bit fields? What is the use of bit fields in a structure declaration?

2044


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1882


What is a class c rental property?

1041


List the difference between a While & Do While loops?

1051


Can we assign string to char pointer?

1041


Why is c fast?

1009


Why is C language being considered a middle level language?

1042


what are non standard function in c

1848


How to compare array with pointer in c?

1049


What is register variable in c language?

986


Find MAXIMUM of three distinct integers using a single C statement

1013