All pastes #1624002 Raw Edit

Mine

public cpp v1 · immutable
#1624002 ·published 2009-10-16 18:18 UTC
rendered paste body
#include<stdio.h>#include<stdlib.h>      //include stdlib for malloc()int *p1,*p2;      //make pointers globalvoid fun(void);     //No need to pass any arguments, as p1,p2 are globalint main(void){    int s;    fun();    s=*p1 + *p2;    printf("Sum= %d",s);    return 0;}void fun(void){    p1=malloc(sizeof(int));     //allocate memory to use it outside fun()    p2=malloc(sizeof(int));    *p1=3;    *p2=5;}