In this code: Pointer_pu32 points to variable a, but which is pointer Boot_st point to?
int * Boot_st;
int a = 15;
int * Pointer_pu32 = &a;
Boot_st = (int *)(*Pointer_pu32); /* what was this code line mean? */
When I try to run
printf("Address of A : %ld\n", &a);
printf("Boot_st : %ld\n", Boot_st);
printf("Address Boot_st : %ld\n", &Boot_st);
printf("Pointer_pu32 : %ld\n", Pointer_pu32);
Here is the result:
Address of A: 3996460
Boot_st : 15
Address Boot_st : 3996472
Pointer_pu32 : 3996460
That means: Boot_st
contains the value of a
, could you explain the behavior of the pointer Boot_st
and Pointer_pu32
?
This code line
Boot_st = (int *)(*Pointer_pu32);
meansPointer_pu32
(*Pointer_pu32)
to read the integer value(int *)
Boot_st =