write a program that finds the factorial of a number using
recursion?
Answer Posted / sheenu singla
//program to find the factorial of a number
#include<stdio.h>
#include<conio.h>
void main()
{
int a,fact=1;
for(a=1;a<=5;a++)
fact=fact*a;
}
printf("%d",fact);
getch();
}
| Is This Answer Correct ? | 18 Yes | 4 No |
Post New Answer View All Answers
What is a constant and types of constants in c?
What is getch?
How will you write a code for accessing the length of an array without assigning it to another variable?
What is #include called?
Do you know the use of 'auto' keyword?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
How can I open a file so that other programs can update it at the same time?
explain what is a newline escape sequence?
Is int a keyword in c?
What is strcpy() function?
Is that possible to store 32768 in an int data type variable?
What is the heap in c?
How are 16- and 32-bit numbers stored?
What is new line escape sequence?
Why c language?