how many times does the loop iterated ?
for (i=0;i=10;i+=2)
printf("Hi\n");
Answers were Sorted based on User's Feedback
Answer / ani
infinite loop, bcoz there is no condition to break the loop.
| Is This Answer Correct ? | 16 Yes | 3 No |
Answer / 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 |
Answer / pradeep
infinite loop becouse ther is no condition given there.
absence of condition it will be printing hi infinite time
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / altaf khan
it will give an error becoz in place of condition it is given a statement which does not returns boolean value
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / sai
It doesn't has condition in the loop to move on, and here i
is of type what?, not mentioned.
This loop doesn't executes with this condition, it should
be told i<= or i>= depending on the requirement.
| Is This Answer Correct ? | 1 Yes | 1 No |
C program to read the integer and calculate sum and average using single dimensional array
write a program to insert an element at the specified position in the given array in c language
How many keywords are there in c?
Explain Basic concepts of C language?
write a “Hello World” program in “c” without using a semicolon?
What will be the output of following program #include main() { int x,y = 10; x = y * NULL; printf("%d",x); }
What is pragma c?
how write a addtion of two single dimensional array using of pointer in c language?
What do header files do?
fun(int x) { if(x > 0) fun(x/2); printf("%d", x); } above function is called as: fun(10); what will it print? }
Do pointers need to be initialized?
How can I call fortran?