#include<stdio.h>
struct Node {
int a;
};
struct Node* prepare() {
struct Node node = { 123456 };
return &node;
}
int main() {
struct Node* node = prepare();
printf("%d\n", node->a);
printf("%d\n", node->a);
return 0;
}
following is the result
so why the results are different?