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
please give me some tips for the placement in the TCS.
What are near, far and huge pointers?
What is double pointer?
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
Explain what is the most efficient way to store flag values?
Is void a keyword in c?
What is static memory allocation?
What is the purpose of void in c?
In which layer of the network datastructure format change is done
Does free set pointer to null?
Explain the properties of union.
Is array name a pointer?
What's a good way to check for "close enough" floating-point equality?
How can I open a file so that other programs can update it at the same time?
What's the total generic pointer type?