like you said...
1. The malloc reserves 8 bytes...int64
2. Sets the first pointer equal to the original pointed to value made by malloc.
3. The q pointer is dereferenced 3 times, so I think the malloced memory is set to the value 0x012345678abcdef
returned value:
char * just recasts it, * dereferences once, so by statement 2, it contains what ever q contained as a char value. So, taking the last char of the int64 value (ef) and by casting it to (int) at the end, you only take the ef and make it signed... which is EF, or neg 17?
AHHHHHHHHHHH...brain freeze...i was reading my political science book while thinking of this at the same time...and it dawned to me..but am I right??
correct me if not
btw, im 20 years old.