how many times does the loop iterated ?
for (i=0;i=10;i+=2)
printf("Hi\n");
Answer Posted / vignesh1988i
this will give an warning message .....
it will print the "Hi" infinite times...... since we used
assignment opeartor in the termination condition of the
looping statement....
when i is initilized to 0 first.. again i=10 is been
initilized to 10... so however i is been incremented by 2 or
by n times.... i=10.. which will be an non zero value.... so
it wont come out of the loop.... infered as infinite running.
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
What does the function toupper() do?
Explain how to reverse singly link list.
What are the primitive data types in c?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
Explain what does the function toupper() do?
Why is not a pointer null after calling free?
What are the differences between new and malloc in C?
What is oops c?
Why can arithmetic operations not be performed on void pointers?
What are 'near' and 'far' pointers?
Explain union. What are its advantages?
What is unsigned int in c?
Explain the use of 'auto' keyword in c programming?
Why c language is called c?