Pointer with function and return


write a program for pointer with function.

 #include<stdio.h>
 #include<conio.h>
   sum(int*,int*);
   void main()
  {
   int a,b,c;
   printf(“Enter two no”);
   scanf(“%d%d”,&a,&b);
   sum(&a,&b);
   getch();
  }
   void sum(int *x, int *y)
  {
   int *p;
   *p=*x+*y;
   printf(“%d”,*p);
  }

write a program for pointer with return.

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