#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



#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf(..

Answer / jitendra mahajan

2
5

Is This Answer Correct ?    74 Yes 6 No

#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf(..

Answer / vijay pal

2
5

Is This Answer Correct ?    18 Yes 0 No

#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf(..

Answer / radha raman

2
3

Is This Answer Correct ?    13 Yes 8 No

#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf(..

Answer / fa

1
1
1
1
1

Is This Answer Correct ?    1 Yes 4 No

#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf(..

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

#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf(..

Answer / vedansh

2
3

Is This Answer Correct ?    2 Yes 6 No

#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf(..

Answer / ajay

error loop is incomplete

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More C Interview Questions

What is the output of the following program main();{printf ("chennai""superkings"}; a. Chennai b. superkings c. error d. Chennai superkings

6 Answers  


Why is it that not all header files are declared in every C program?

0 Answers  


Difference between linking and loading?

0 Answers  


Differentiate between null and void pointers.

0 Answers   TCS,


What does a run-time "null pointer assignment" error mean?

2 Answers  






what are non standard function in c

0 Answers  


Suggesting that there can be 62 seconds in a minute?

0 Answers  


How do you list files in a directory?

0 Answers  


What is declaration and definition in c?

0 Answers  


How to implement variable argument functions ?

1 Answers   HP,


How can I sort more data than will fit in memory?

0 Answers  


What is the newline escape sequence?

0 Answers  


Categories