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
Simplify the program segment if X = B then C ← true else C ← false
What is difference between structure and union in c programming?
Explain how can I manipulate strings of multibyte characters?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What are called c variables?
How do you use a 'Local Block'?
In a header file whether functions are declared or defined?
What are the different types of pointers used in c language?
Why is c platform dependent?
What is the difference between constant pointer and constant variable?
what is the structure pointer?
What is operator precedence?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
How are structure passing and returning implemented?
What does c mean in standard form?