I'm starting a unit on Software Security - in some prelim reading, I've come across the following pointer syntax and I'm not sure I understand.
int x = 20;
int* p = &x;
int k = *(p+1);
What is k in the example?
I know if I have an array like so:
int j[10] = {0};
int k = *(j+1);
such syntax will de-reference the int (system's sizeof(int)
) at location 1 of array j.
So how does this work with the non-array example above?