#include<stdio.h>
float * display(int,int);
int max=5;
int main(){
float *(*ptr)(int,int);
ptr=display;
(*ptr)(2,2);
printf("%u",ptr);
ptr=ptr+1;
printf(" %u",ptr);
return 0;
}
float * display(int x,int y){
float f;
f=x+y+max;
return &f;
}
it will genetate "compile time error"
ahy is it so...???
Because of this:
ptr=ptr+1;
ptr is a pointer to a function. What do you expect to happen when you add one to a pointer to a function?