#include int a,b; //make variables to be referenced global void fun(int**,int**); /*pass double pointers so that changes made to them are visible outside fun()*/ int main(void) { int s; int *p1,*p2; fun(&p1,&p2); //Address of p1 & p2 must be passed as they are single pointers s=*p1 + *p2; printf("Sum= %d",s); return 0; } void fun(int **dp1,int **dp2) { a=3; b=5; *dp1=&a; *dp2=&b; }