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

Can a program have two main functions?

575


What is the -> in c?

588


How can I get the current date or time of day in a c program?

654


What are disadvantages of C language.

652


How do we declare variables in c?

576






When should a type cast be used?

577


What is a macro in c preprocessor?

634


What is the scope of static variables in c language?

633


Why can’t we compare structures?

818


What are the 5 organizational structures?

571


How can I get back to the interactive keyboard if stdin is redirected?

673


What is difference between Structure and Unions?

644


What is keyword in c?

606


What are examples of structures?

600


In C programming, what command or code can be used to determine if a number of odd or even?

627