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
What is indirection?
Explain the use of function toupper() with and example code?
Stimulate calculator using Switch-case-default statement for two numbers
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
Why main is used in c?
Do you know what are bitwise shift operators in c programming?
What are the two types of structure?
What is dangling pointer in c?
How can you check to see whether a symbol is defined?
What is pointer to pointer in c?
What is the method to save data in stack data structure type?
How can you allocate arrays or structures bigger than 64K?
What are the types of pointers in c?
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
Simplify the program segment if X = B then C ← true else C ← false