write a programe to find the factorial of given number
using recursion

Answer Posted / hari

int fact(int n)
{
if(n==1)
return 1;
else
return(n*fact(n-1));
}

for further queries and discussions, just check these out !!!

http://forum.campusmaniac.com/
http://www.campusmaniac.com/

Is This Answer Correct ?    13 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain which function in c can be used to append a string to another string?

574


Explain what header files do I need in order to define the standard library functions I use?

641


Is c weakly typed?

563


How can I access an I o board directly?

614


What are compound statements?

619






Explain pointer. What are function pointers in C?

617


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

2256


How can you read a directory in a C program?

643


Can an array be an Ivalue?

657


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

598


Explain what is output redirection?

657


What is character constants?

705


How can I call fortran?

632


What is file in c preprocessor?

640


explain what are actual arguments?

626