Function with arguments and no return values

 

* The called function will receive data from the calling function.
* The calling function has check the validity of the data if necessary before it.
* Communication between calling function and called function with arguments but no return value.

 

$ The actual args and formal args should match in no type and order
$ The value of actual args are assigned to the formal args on to a one -to –one basis.
$ In case the actual args are more than the formal args means the extra actual args are discarded.
$ In case the actual args are less than the formal args means unmatched formal args are initialized to some garbage value.
$ The formal args are must be valid for variable name and the actual args may be variablename,expression & Constant

 

//CODING
#include<stdio.h>
#include<conio.h>
void main()
{
    int x,y;
    printf(“Enter the value of x,y”);
    scanf(“%d%d”,&x,&y);
   void mul(int x,int y);
  }
      void mul(int a,int b)
{
int p;
P=a*b;
Printf(“mul of x,y is=%d”,p);
  }

 

 

 

cATEGORIES OF FUNCTIONS by mrs.sp.nandhini