How many times does the loop iterated?for(i=0;i=10;i+=2)printf("Hi\n");A.10B. 2C. 5D. None of these

This question is related to TCS Interview

Showing Answers 1 - 10 of 10 Answers

rahul koshti

  • Jul 10th, 2006
 

The value 10 is assigned to i every time, therefore the loop goes into infinite loop.So Option [D].

  Was this answer useful?  Yes

Shivaji Byrapaneni

  • Oct 13th, 2007
 

Infinaite
for the simple reason x=10 not x==10
:)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions