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
what is a function method?give example?
What is data structure in c language?
What is the benefit of using #define to declare a constant?
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
what are bit fields? What is the use of bit fields in a structure declaration?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
What is a class c rental property?
List the difference between a While & Do While loops?
Can we assign string to char pointer?
Why is c fast?
Why is C language being considered a middle level language?
what are non standard function in c
How to compare array with pointer in c?
What is register variable in c language?
Find MAXIMUM of three distinct integers using a single C statement