It has been a while that I used pointers and I just wanna quickly check how I can initialize an integer pointer?
a) int *tmpPtr = 0; b) int *tmpPtr = null;
I was just refreshing my pointer knowledge and stumbled across this.
int *tmpPtr = 0;
i find it easier to think of it like this:
int *tmpPtr ; tmpPtr = 0 ;
I 'believe' the above 2 lines are equivalent to that one line. so basically the address to be de-referenced is set to 0 or NULL.
NULL