#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
What are the header files used in c language?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
Write the syntax and purpose of a switch statement in C.
What is the use of ?
Difference between MAC vs. IP Addressing
How can I make it pause before closing the program output window?
What is the purpose of clrscr () printf () and getch ()?
Hi can anyone tell what is a start up code?
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
write a program to find the given number is prime or not
What is the difference between malloc() and calloc() function in c language?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What is a function in c?
List the difference between a "copy constructor" and a "assignment operator"?
In C programming, what command or code can be used to determine if a number of odd or even?