#include int *f1() { static int s = 12345 ; return &s ; } int *f2() { auto int a = 12345 ; return &a ; } void Demo(int *(*f)()) { int *p = (*f)() ; printf("Address=%08X, Contents=%d\n", p, *p) ; printf("Address=%08X, Contents=%d\n", p, *p) ; printf("\n") ; } int main() { Demo(f1) ; Demo(f2) ; return 0 ; }