Write a C program to print 1 2 3 ... 100 without using
loops?
Answer Posted / uma maheswari
#include<stdio.h>
#include<conio.h>
int i=1;
void main()
{
i<=100 ? printf("%d\n",i) : getch(); //conditional operator
i++;
main(); //recursive calling of main() function
}
Is This Answer Correct ? | 10 Yes | 7 No |
Post New Answer View All Answers
What is c definition?
What is the meaning of ?
How are portions of a program disabled in demo versions?
Where are local variables stored in c?
How can I make it pause before closing the program output window?
Why is structure important for a child?
What is huge pointer in c?
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
How can you find the exact size of a data type in c?
What is the difference between printf and scanf in c?
What is conio h in c?
What is static volatile in c?
What is the use of function in c?
What are lookup tables in c?
List a few unconditional control statement in c.