write a program that finds the factorial of a number using
recursion?

Answer Posted / danish

>
#include<conio.h>
int fact(int);
void main()
{
int num,fact1;
clrscr();
printf("Enter a value of num");
scanf("%d",&num);
fact1=fact(num);
printf("factorial=%d",fact1);
}
int fact(int n)
{
if(n==0)
{
return 1;
}
else
{
return

Is This Answer Correct ?    13 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

657


What is string concatenation in c?

564


What is a pointer in c plus plus?

685


What is typeof in c?

598


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

603






Is c pass by value or reference?

593


Does sprintf put null character?

593


What is a pointer variable in c language?

641


Explain how do you print an address?

652


in iso what are the common technological language?

1627


Write a program that accept anumber in words

1246


What does s c mean in text?

605


What is a #include preprocessor?

612


What do you mean by c what are the main characteristics of c language?

564


what is the difference between 123 and 0123 in c?

715