I'm in a data structures course, our midterm is coming up and our practice midterm asks if each line is valid syntax:
int num = 10;
int *p, *q;
p = #
q = p; //valid
*p = q; //invalid, int* cannot be assigned to int
(*p)++; //valid
&num+1; //valid ********
p++; //valid ********
So the last two lines of code, as I understand it, add 1 to the address of the num variable.
What purpose would this have in coding?