#include<stdio.h>
main()
{int i=1;j=1;
for(;;)
{if(i>5)
break;
else
j+=1;
printf("\n%d",j)
i+=j;
}
}
Answer Posted / sourav basu
1 1
print statement is printing 'j', not 'i'. and the for loop works on the basis of value of 'i'..
tested and verified answer on gcc compiler
| Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
Write a C program in Fibonacci series.
Can we replace the struct function in tree syntax with a union?
Is main is user defined function?
What does 4d mean in c?
What is the description for syntax errors?
Is it acceptable to declare/define a variable in a c header?
using only #include
How can I get back to the interactive keyboard if stdin is redirected?
Is it possible to pass an entire structure to functions?
Explain data types & how many data types supported by c?
What is the main difference between calloc () and malloc ()?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
What is a program flowchart and how does it help in writing a program?
What does printf does?
What is the use of a semicolon (;) at the end of every program statement?