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
Write a program to implement queue.
How can I send mail from within a c program?
What does typeof return in c?
Is there a built-in function in C that can be used for sorting data?
What is nested structure?
What is NULL pointer?
What are the differences between Structures and Arrays?
FILE PROGRAMMING
Explain why c is faster than c++?
What is the function of volatile in c language?
What are identifiers and keywords in c?
Is c call by value?
What are the different types of control structures in programming?
Differentiate between the expression “++a” and “a++”?
What is the maximum no. of arguments that can be given in a command line in C.?