#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 are the functions to open and close file in c language?

0 Answers  


What is array of structure in c?

0 Answers  


Explain Function Pointer?

0 Answers   Wipro,


How many bytes are occupied by near, far and huge pointers (dos)?

0 Answers  


a program that can input number of records and can view it again the record

0 Answers   Accenture,






wat are the two methods for swapping two numbers without using temp variable??

2 Answers  


What is function and its example?

0 Answers  


please give code for this 1 2 4 7 11 16

11 Answers   Intel, Wipro,


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

0 Answers  


What is a ternary operator in c?

0 Answers  


SRUCTURE PROGRAMMING

3 Answers   CTS, Wipro,


What does emoji p mean?

0 Answers  


Categories