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
How can I list all of the predefined identifiers?
Why is c so powerful?
Explain how can you tell whether a program was compiled using c versus c++?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
What does the c preprocessor do?
What is main () in c language?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
Can one function call another?
Where static variables are stored in c?
What are run-time errors?
I heard that you have to include stdio.h before calling printf. Why?
Difference between macros and inline functions? Can a function be forced as inline?
What is array within structure?
What are called c variables?
What is the use of a conditional inclusion statement in C?