functions with arguement and with a return value

 

1. A function has arguments it receive any data from the calling function.

2.It return values to the calling function and receive data from the called function.

3.That is the data transfer between calling and called function.

 

 

 

//CODING

 

 

 

#include<stdio.h>
main()
{
int n,r,ncr;
printf(“Enter the value of n,r”);
scanf(“%d%d”,&n,&r);
ncr=fact(n)/fact(ncr)*fact(r);
printf(“ncr= “,ncr);
   }
fact(x)
int x,f=1;
{
for(i=1;i<x;i++)
f=f*i;
return(f);
  }

 

 

 

 

 

 

 

cATEGORIES OF FUNCTIONS by mrs. SP.NaNDHINI