Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.76/5 (7 votes)
See more:
How many times will times will the following loop be executed ?

For i=2 TO 14 step 3
body of loop
Next i

a)4 b)5 c)12 d) 13
Posted
Updated 27-Jan-14 20:11pm
v3
Comments
prasanna.raj 28-Jan-14 1:06am    
This is my interview question i just give the option if u know this kindly let me know
[no name] 29-Jan-14 16:17pm    
This might have been an appropriate interview question 30 years ago. You should respectfully decline the interview. Oh, and the answer is 5.

1 solution

This is a very inappropriate question. Here is the solution for you: compile this code, run it under the debugger and find out.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900