I was studying the data structure in C programming. and I got a question of pointer. there is a simple initialization of pointer variable head.
int* head = NULL;
I had to look into the notion of pointer in C. and now I got it. but,
when I use that code. I can't understand how *head could be assigned by a value NULL. because as I know, variable head(not *head) should have an int value first. (which is an address for type integer).
But It doesn't have any value in that code.
So... my opinion is.....
int* head;
head = (some address here);
*head = NULL;
this code does make sense to me. Because There is a value for head which has to be an address of type integer.
but still don't know how first code can work.
the first code:
int* head = NULL;