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...


what is the coding of display the factorial of a number
using array and function?



what is the coding of display the factorial of a number using array and function?..

Answer / balaji ganesh

#include<stdio.h>
int fact(int m)
{
int i,f=1;
for(i=m;i>0;i--)
f=f*m--;
return f;
}
void main()
{
int n,s;
clrscr();
scanf("%d",&n,printf("enter the number:"));
s=fact(n);
printf("factorial of %d is=%d",n,s);
getch();
}

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More C Interview Questions

How can I set an array's size at run time?

9 Answers  


Please write the area of a RIGHT ANGLED TRIANGLE.

1 Answers  


can u give me the good and very optimised code for a car racing game?

0 Answers  


What are formal parameters?

0 Answers  


write a c program to find largest of three numbers using simple if only for one time.

1 Answers  


can u suggest me am in a confusion to choose whether to go to c programming or a software testing . am a graduate in B.sc(electronics).

1 Answers  


How can a process change an environment variable in its caller?

0 Answers  


What are the types of type qualifiers in c?

0 Answers  


i want to know the procedure of qualcomm for getting a job through offcampus

0 Answers   HCL,


How can I do serial ("comm") port I/O?

0 Answers   Celstream,


Combinations of fibanocci prime series

0 Answers  


which one is better structure or union?(other than the space occupied )

2 Answers  


Categories