Write a C program to print 1 2 3 ... 100 without using
loops?
Answer Posted / lakshmipraba
#include<stdio.h>
int i;
void main()
{
if(i<=100)
{
printf("%d ",i);
i++;
main();
}
if(i>100)
exit(0);
}
Is This Answer Correct ? | 14 Yes | 3 No |
Post New Answer View All Answers
Is it possible to have a function as a parameter in another function?
How do we print only part of a string in c?
What is void c?
Can you apply link and association interchangeably?
Explain what are global variables and explain how do you declare them?
What is main return c?
Write a program to reverse a string.
What is the use of #include in c?
What is the right type to use for boolean values in c? Is there a standard type?
What is echo in c programming?
What is the difference between memcpy and memmove?
Explain the difference between #include "..." And #include <...> In c?
Can the curly brackets { } be used to enclose a single line of code?
How do shell structures work?
What are the differences between Structures and Arrays?