Function returning pointer to float in c

float * usa(){
    static float*  p,a=5>=5;
    p=&a;
    return p;
}
void main(){
    float *real;
    real=usa();
    clrscr();
    printf("%.2e",*real);
    getch();
}
Output: 1.00e+00
Post a Comment