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 / sagar

we can also create such a program without using loops and if
statement too ...

void main()
{
int i,n;
clrscr();
A:
printf("%d",i);
n=i++;
switch(n)
{
case 100: break;
default : goto A;
}
getch();
}

Is This Answer Correct ?    9 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is ur strangth & weekness

2436


What is logical error?

1128


What is %d used for?

1042


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

2305


What are the properties of union in c?

1055


What are disadvantages of C language.

1168


Which of these functions is safer to use : fgets(), gets()? Why?

1114


What are the disadvantages of external storage class?

1062


cavium networks written test pattern ..

4083


Difference between macros and inline functions? Can a function be forced as inline?

1278


What is getche() function?

1050


What does the && operator do in a program code?

1240


Describe explain how arrays can be passed to a user defined function

1109


What is the collection of communication lines and routers called?

1129


What are pointers?

1117