Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

1116


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

1052


Write a program to print all permutations of a given string.

1190


What is the most efficient way to store flag values?

1181


List the variables are used for writing doubly linked list program.

2026


What is infinite loop?

1081


Write the test cases for checking a variable having value in range -10.0 to +10.0?

2316


What is the modulus operator?

1204


What is the concatenation operator?

1147


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1717


What is the g value paradox?

1168


What are data structures in c and how to use them?

1164


What are local static variables? How can you use them?

1145


Without Computer networks, Computers will be half the use. Comment.

2296


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

1237