I have a homework question that instantiates 4 node pointers, *p, *q, *r, *t, and the first three have a number, 1, 2, and 3 respectively. I have to draw out (using 'blocks' and arrows) what the memory would look like when these lines of code occur:
p->next = q;
q->next = r;
t=r;
r->next = p;
r->next->next=r;
I don't really understand the usage of 'next' in regards to what it points to, nor do I get what the lines like "p->next = q" actually are changing to the values in terms of reassigning them. Any help or insight is very much appreciated!