program in c to print 1 to 100 without using loop
Answer Posted / praveen
#include<stdio.h>
#include<stdlib.h>
void prav(int);
main()
{
int i=1;
prav(i);
}
void prav(int j)
{
if(j<101)
{printf("%d\n",j);
j++;
prav(j);}
else
exit(0);
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is break in c?
Why should I use standard library functions instead of writing my own?
Can we compile a program without main() function?
What is a string?
Is main is a keyword in c?
What is "Duff's Device"?
Can you write the function prototype, definition and mention the other requirements.
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
Explain what is the difference between the expression '++a' and 'a++'?
Compare array data type to pointer data type
What is the purpose of & in scanf?
How can you tell whether two strings are the same?
Differentiate between #include<...> and #include '...'
What is #include cctype?
How arrays can be passed to a user defined function