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



how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); ..

Answer / ani

infinite loop, bcoz there is no condition to break the loop.

Is This Answer Correct ?    16 Yes 3 No

how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); ..

Answer / guest

infinite coz there is no condition to stop it

Is This Answer Correct ?    11 Yes 4 No

how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); ..

Answer / guest

Infinite

Is This Answer Correct ?    7 Yes 3 No

how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); ..

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

how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); ..

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

how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); ..

Answer / rahul

infinite times

Is This Answer Correct ?    4 Yes 3 No

how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); ..

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

how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); ..

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

how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); ..

Answer / viji

It will give a warning message........

Is This Answer Correct ?    1 Yes 9 No

Post New Answer

More C Interview Questions

When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these

1 Answers   Accenture, IBM,


Give the output for the following program. #define STYLE1 char main() { typedef char STYLE2; STYLE1 x; STYLE2 y; clrscr(); x=255; y=255; printf("%d %d\n",x,y); }

2 Answers   ADITI,


What is a char in c?

0 Answers  


what does ‘Bus Error’ mean?

1 Answers   ABC,


What is the value of h?

0 Answers  






I have seen function declarations that look like this

0 Answers  


which type of aspect you want from the student.

0 Answers   IBM, TCS,


Write a program to add the following ¼+2/4+3/4+5/3+6/3+... (Like up to any 12 no.s)

1 Answers   HTC,


Write a program to accept a character & display its corrosponding ASCII value & vice versa?

9 Answers  


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

0 Answers  


we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above

0 Answers  


WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?

4 Answers  


Categories