Function returning pointer to double in c

double * iit(){
    static double d=-11.003,*iit=&d;
    return iit;
}
void main(){
    double *temp;
    temp=iit();
    clrscr();
    printf("%+g",*temp);
    getch();
}
Output: 1.00e+00

No comments: