Thursday 3 September 2009

Function returning pointer to integer in c

int *go(){    static int go[][3]={1,0,-1,-2,-3,-4};    return *go;}void main(){    int *xxx;    xxx=go();    clrscr();    printf("%d",*(xxx+3));    getch();}Output:12

No comments:

Post a Comment