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

what is event driven software and what is procedural driven software?

2019


What are the parts of c program?

642


Is the exit() function same as the return statement? Explain.

668


Can you mix old-style and new-style function syntax?

666


What is adt in c programming?

615






Differentiate between #include<...> and #include '...'

621


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

674


Why we not create function inside function.

1753


what is the syallabus of computer science students in group- 1?

1846


What is the equivalent code of the following statement in WHILE LOOP format?

774


Is python a c language?

555


What are the data types present in c?

631


Explain b+ tree?

634


Can you define which header file to include at compile time?

593


Describe wild pointers in c?

644