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?



there is two conditions , 1. while using for loop for printing 1 to 50 no's simulteneous 2...

Answer / 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

More C Interview Questions

how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?

2 Answers   Patni, TCS,


c program to manipulate x=1!+2!+3!+...+n! using recursion

1 Answers   TCS,


What is the use of linkage in c language?

0 Answers  


What is meaning of tree

0 Answers  


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

2 Answers   HCL, IBM, Satyam, Vimal, Vimukti Technologies,






What does c mean in standard form?

0 Answers  


can we implement multi-threads in c.

0 Answers  


wats the diference btwen constant pointer and pointer to a constant.pls give examples.

9 Answers  


What is the difference between array and pointer in c?

0 Answers  


how to swap 4 number without using temporary number?

2 Answers  


What is realloc in c?

0 Answers  


what value is returned to operating system after program execution?

0 Answers  


Categories