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 the explanation for modular programming?
Do pointers take up memory?
write a program to find the given number is prime or not
Is there a way to jump out of a function or functions?
What does malloc () calloc () realloc () free () do?
largest Of three Number using without if condition?
What is the difference between int main and void main in c?
If fflush wont work, what can I use to flush input?
What is %g in c?
What is the difference between class and object in c?
Write a program to print "hello world" without using a semicolon?
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
What is wrong with this program statement?
Explain how can you determine the size of an allocated portion of memory?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.