All pastes #1624010 Raw Edit

Mine

public cpp v1 · immutable
#1624010 ·published 2009-10-16 18:24 UTC
rendered paste body
#include<stdio.h>int a,b;            //make variables to be referenced globalvoid 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;}