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

please give me some tips for the placement in the TCS.

2151


What are near, far and huge pointers?

1112


What is double pointer?

1039


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

2805


Explain what is the most efficient way to store flag values?

1270


Is void a keyword in c?

1046


What is static memory allocation?

1236


What is the purpose of void in c?

1107


In which layer of the network datastructure format change is done

1940


Does free set pointer to null?

1058


Explain the properties of union.

1129


Is array name a pointer?

1073


What's a good way to check for "close enough" floating-point equality?

1251


How can I open a file so that other programs can update it at the same time?

1238


What's the total generic pointer type?

1104