Online Examination System for all learner!!! coming soon..

C : Program to calculate the factorial of a number.

Program to calculate the factorial of a number.


#include<stdio.h>
#include<conio.h>
main()
{
        int x,n;
        printf("Enter a number :");
        scanf("%d",&n);
        x=fact(n);
        printf("%d",x);
}
int fact(int n)
{
        int f=1;
        while(n>0)
        {
                f=f*n;
                n--;
        }
        return f;

}

C Programming Online Test 1

Following quiz provides Multiple Choice Questions (MCQs) related to C Programming Framework. You will have to read all the given answ...