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
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
explain what are pointers?
What is the difference between exit() and _exit() function in c?
What happens if a header file is included twice?
Difference between macros and inline functions? Can a function be forced as inline?
What is #include cctype?
Can static variables be declared in a header file?
Are pointers integer?
Give basis knowledge of web designing ...
What is #pragma statements?
explain what is a newline escape sequence?
What is the difference between Printf(..) and sprint(...) ?
please explain every phase in the "SDLC" in the dotnet.
Explain zero based addressing.
Are enumerations really portable?