#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 |
how to add numbers without using arithmetic operators.
What is the difference between call by value and call by reference in c?
what is a non volatile key word in c language?
Suppose I want to write a function that takes a generic pointer as an argument and I want to simulate passing it by reference. Can I give the formal parameter type void **, and do something like this? void f(void **); double *dp; f((void **)&dp);
what are the advantage of pointer variables? write a program to count the number of vowels and consonants in a given string
What are the advantages and disadvantages of pointers?
Explain the difference between malloc() and calloc() function?
Is there sort function in c?
Can we change the value of static variable in c?
What is wrong in this statement?
What is a method in c?
What is the best way to comment out a section of code that contains comments?