Hi, Everyone! I am a beginner for C and always confused with the asterisk ( * ) before a pointer. I think, the asterisk has two functionality relater to a pointer. As show below:
int x = 1, y = 2;
int * a; // the functionality of the asterisk is to indicate that the variable " a " is a pointer.
a = &x;
printf("%d\n", *a); // It will prints " 1", because the asterisk ( * ) is used to dereference the pointer a , which means getting the value
// of the object which a point to.
Is my understanding correct?
Besides, where the computer store the variable identifiers (like x, y, a)? What is going on among the address of a variable, the identifier of a variable, the value of the variable in a computer architecture perspective?
Thanks a lot!