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
Is this program statement valid? INT = 10.50;
Are bit fields portable?
Tell us the use of fflush() function in c language?
What is the use of f in c?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
What is 1f in c?
What is else if ladder?
What is register variable in c language?
Difference between Shallow copy and Deep copy?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
Explain how are 16- and 32-bit numbers stored?
Explain the use of fflush() function?
Why is event driven programming or procedural programming, better within specific scenario?
what is reason of your company position's in india no. 1.