#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


Please Help Members By Posting Answers For Below Questions

How can you avoid including a header more than once?

553


What are different types of pointers?

550


What is the use of bit field?

621


What does stand for?

582


What are identifiers and keywords in c?

554






Is boolean a datatype in c?

533


When should the volatile modifier be used?

667


What is a pointer variable in c language?

634


How can I split up a string into whitespace-separated fields?

556


Write a program to reverse a given number in c?

584


Write a progarm to find the length of string using switch case?

1594


#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.

5160


What is a void pointer? When is a void pointer used?

611


Do variables need to be initialized?

610


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

1692