I am newer to C language. Let's get started with the test code below.
struct node {
int data;
struct node *next;
};
int main() {
struct node *n;
struct node *n2;
struct node *n3;
struct node *n4;
struct node *n5;
printf("%p\n", n);
printf("%p\n", n2);
printf("%p\n", n3);
printf("%p\n", n4);
printf("%p\n", n5);
return 0;
}
The output show below,
0x7fff57c42888
0x0
0x0
0x0
0x0
I cannot understand that the pointer address of variable n is not null. And, The other variables that have the same *node type are 0X0. Who can explain the reason for it? Thx.