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

Write a program to implement queue.

1168


How can I send mail from within a c program?

1076


What does typeof return in c?

1159


Is there a built-in function in C that can be used for sorting data?

1338


What is nested structure?

1095


What is NULL pointer?

1144


What are the differences between Structures and Arrays?

1271


FILE PROGRAMMING

2294


Explain why c is faster than c++?

1124


What is the function of volatile in c language?

1184


What are identifiers and keywords in c?

1196


Is c call by value?

1076


What are the different types of control structures in programming?

1176


Differentiate between the expression “++a” and “a++”?

1309


What is the maximum no. of arguments that can be given in a command line in C.?

1199