C Programming
    Accept Argument And No Return
                           
When we pass any value in calling function but the called function does not return any value to the calling function then it is called Accept Argument and No Return. In this case we write the data type of variable in prototype declaration which is going to be pass in calling function.


Ex.


void sum(int,int);   // prototype declaration

                                 void main()
            {
           int a,b;

 printf("Enter two no to add");
scanf("%d%d",&a,&b);

printf("%d%d",a,b);
printf("Now, ready to call");
sum(a,b);  // we are calling here sum function

 getch();
             }
                        void sum(int a, int b) // called function sum or function body

{
int c;
c=a+b;
printf("In called function");
printf("Sum=%d",c);
}

Note: We can pass different data type variable but in calling function as well as called function the parameter sequence will be same as given in prototype declaration.         

  C Programming