Friday, November 04, 2005

using getbuf

Shows the usage of getbuf

 

 

#include <stdio.h>

 

char *getbuf(char **pC)

{

    static char buff[] = "good morning";

    *pC = "good afternoon";

    return buff;

}

 

int main()

{

    char *b, *r;

 

    b = getbuf(&r);

    printf("In main, b: %s \n", b);

    printf("In main, r: %s \n", r);

    return 0;

}

 

 

 

Pradyut
http://pradyut.tk
http://spaces.msn.com/members/oop-edge/
http://groups-beta.google.com/group/oop_programming
India

 

No comments: