GeeksforGeeks » Interview Questions
Honeywell Interview Question for Software Engineer/Developer (Fresher) about CPuzzles
(4 posts)-
for(i=0; i<=10; i++, printf("%d",i));
output?
-
For loop flow
Initialize
check condition
if false goto end
next:
execute body
update index (here is our output statement)
check condition
if false goto end
else
goto next
end: -
1
2
3
4
5
6
7
8
9
10
11 -
hey ANKUL your answer is correct but there is no '\n' in printf so the output will be printed in one line :)
Reply
You must log in to post.