GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  TCS  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 62 of 87    Print  
How many times does the loop iterated?
for(i=0;i=10;i+=2)
printf("Hi\n");

A.10
B. 2
C. 5
D. None of these


  
Total Answers and Comments: 4 Last Update: June 13, 2008   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 10, 2006 09:47:10   #1  
rahul koshti        

RE: How many times does the loop iterated?for(i=0...
The value 10 is assigned to i every time therefore the loop goes into infinite loop.So Option [D].
 
Is this answer useful? Yes | No
October 13, 2007 04:00:21   #2  
Shivaji Byrapaneni        

RE: How many times does the loop iterated?for(i=0...
Infinaite
for the simple reason x 10 not x 10
:)

 
Is this answer useful? Yes | No
March 04, 2008 09:24:00   #3  
geekmuru42 Member Since: March 2008   Contribution: 2    

RE: How many times does the loop iterated?for(i=0;i=10;i+=2)printf("Hin");A.10B. 2C. 5D. None of these
answer is D.. Bcos control will not enter into the loop at all..
 
Is this answer useful? Yes | No
June 13, 2008 11:44:25   #4  
chandradeepika Member Since: May 2008   Contribution: 36    

RE: How many times does the loop iterated?for(i=0;i=10;i+=2)printf("Hin");A.10B. 2C. 5D. None of these
ans:D)none of these.
Becoz the loop is executed for 6 times.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape