I have searched and found a program for dangling pointers through some websites. I found one best program that executes perfectly in TC. But I cannot understand entire meaning of the program due my doubt in fflush(stdin). So please tell the meaning and other proceedings of the following program:
#include<stdio.h>
int *call(void);
int main(void) {
int *ptr;
ptr = call();
fflush(stdin);
printf("%d", *ptr);
return 0;
}
int *call(void) {
int x = 25;
++x;
return &x;
}