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 / 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 Help Members By Posting Answers For Below Questions

How can I insert or delete a line (or record) in the middle of a file?

976


What is a protocol in c?

946


What are the features of the c language?

1035


What is the difference between if else and switchstatement

1841


what is reason of your company position's in india no. 1.

2229


What is time complexity c?

940


What are the difference between a free-standing and a hosted environment?

1219


What are the loops in c?

942


When should I declare a function?

1054


Tell us something about keyword 'auto'.

1010


What is the use of f in c?

933


Is c easier than java?

998


Can you please explain the difference between malloc() and calloc() function?

1049


How can I automatically locate a programs configuration files in the same directory as the executable?

1102


What are header files why are they important?

1043