Hello I am kind of stuck on this idea of how memory works in C.
Is the tmpPtr pointing to the 3rd element in the array or the 7th in the second if statement. If the later is that why I would use free()??? Thank you for any help given it is greatly appreciated.
Code:int array[10], *ptrToArr; ptrToArr = &array[0]; if(some condition){ int *tmpPtr; tmpPtr = ptrToArr; printf("%d", *tmpPtr+4); } if(this is also true){ int *tmpPtr; tmpPtr = ptrToArr; printf("%d", *tmpPtr+2) } ptrToArr++;