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 the benefits of c language?

641


How can I list all of the predefined identifiers?

576


What is c programming structure?

614


How is a pointer variable declared?

588


What is signed and unsigned?

637






What does s c mean in text?

605


What are shell structures used for?

595


What is line in c preprocessor?

608


Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?

574


Explain what is the benefit of using #define to declare a constant?

604


What are the different types of errors?

635


please send me the code for multiplying sparse matrix using c

1719


Which header file should you include if you are to develop a function which can accept variable number of arguments?

802


How can you determine the maximum value that a numeric variable can hold?

633


What is the difference between far and near in c?

599