The number of different unordered combination of r objects from a set of n objects is called n C r Factorial of n and r. A binomial coefficient Cn k can be defined as the coefficient of Xk in the expansion of 1 Xn. An important part of finding combination in C Programming is calculation of the Factorial of a Number.
N-r1 r r-1.
We will use a recursive user defined function to perform the task. We can use distributive property of modulor operator to find nCr p using above formula. Here we have a function find_factorial that calls itself in a recursive manner to find out the factorial of input number. Create a matrix of size 1000 1000 assign the value of base cases ie.