Call function


Function with arguments and no return values


function3

W.A.P for function with arguments and no return values

 #include<stdio.h>
 #include<conio.h>
   void sum(int ,int );
   void main()
  {
   int a ,b;
   printf(“enter Two no\n”);
   scanf(“%d%d”,&a,&b);
   sum(a, b);
   getch();
  }
   void sum(int x, int y)
  {
   int s;
   s=x+y;
   printf(“%d”,s);
 }

Function with arguments and return values.


      Syntax:-
   function4

W.A.P for function with arguments and return values.

 #include<stdio.h>
 #include<conio.h>
   int sum(int ,int );
   void main()
  {
   int a ,b , c;
   printf(“enter Two no\n”);
   scanf(“%d%d”,&a,&b);
   c=sum(a, b);
   printf(“%d”,c);
   getch();
  }
   int sum(int x, int y)
  {
   int s;
   s=x+y;
   return s;
  }