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

1 comment:

pawan said...

Output is not correct, it should be -2.