Write a C program to print 1 2 3 ... 100 without using
loops?

Answer Posted / sutanu

void main ()
{
static int i;
if (i <= 100)
{
printf ("%d\n", i);
i++;
main ();
}
}

Is This Answer Correct ?    53 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are file streams?

573


What is the most efficient way to count the number of bits which are set in an integer?

594


What is the difference between exit() and _exit() function?

607


What is the difference between ā€˜gā€™ and ā€œgā€ in C?

2575


Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff

2243






What is pass by reference in functions?

326


Explain heap and queue.

590


What is ponter?

775


What is context in c?

542


What is huge pointer in c?

586


What is an endless loop?

804


What are the different types of endless loops?

625


What is derived datatype in c?

638


Tell me when would you use a pointer to a function?

610


What is an identifier?

631