// This is the INCORRECT version of good_example.cpp. #include #include int * bad_function() { int x = 5; return &x; // this is illegal, may lead to the program crushing, or to bugs. } int main() { int * a = bad_function(); printf("a = %d\n", *a); }