#include<stdio.h>
main()
{int i=1;j=1;
for(;;)
{if(i>5)
break;
else
j+=1;
printf("\n%d",j)
i+=j;
}
}
Answers were Sorted based on User's Feedback
Answer / 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 |
what is the difference between c and c++?
How to find the usage of memory in a c program
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
input may any number except 1,output will always 1.. conditions only one variable should be declare,don't use operators,expressions,array,structure
write a c program to check weather a particluar bit is set or not?
write a program to check whether a number is Peterson or not.
What is the difference between a free-standing and a hosted environment?
implement NAND gate logic in C code without using any bitwise operatior.
enum day = { jan = 1 ,feb=4, april, may} what is the value of may? a)4 b)5 c)6 d)11 e)none of the above
a=0; b=(a=0)?2:3; a) What will be the value of b? why b) If in 1st stmt a=0 is replaced by -1, b=? c) If in second stmt a=0 is replaced by -1, b=?
What is the scope of global variable in c?
Is it possible to execute code even after the program exits the main() function?