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 event driven software and what is procedural driven software?
What are the parts of c program?
Is the exit() function same as the return statement? Explain.
Can you mix old-style and new-style function syntax?
What is adt in c programming?
Differentiate between #include<...> and #include '...'
What is the maximum no. of arguments that can be given in a command line in C.?
Why we not create function inside function.
what is the syallabus of computer science students in group- 1?
What is the equivalent code of the following statement in WHILE LOOP format?
Is python a c language?
What are the data types present in c?
Explain b+ tree?
Can you define which header file to include at compile time?
Describe wild pointers in c?