Dereferencing pointers without pointing them at a variable
- by Miguel
I'm having trouble understanding how some pointers work. I always thought that when you created a pointer variable (p), you couldn't deference and assign (*p = value) unless you either malloc'd space for it (p = malloc(x)), or set it to the address of another variable (p = &a)
However in this code, the first assignment works consistently,…