As others have said, the result you get is in a multiple of the size of the type the pointers are pointing to. Cast them to be char pointers and the result you get will be in terms of bytes. Also, you should use the ptrdiff_t type, so that on systems with 64-bit pointers the type should be large enough to hold the result.
ptrdiff_t c = (char*)p - (char*)q;
Also note that taking the difference of the addresses of two values that aren't in the same array is undefined in the standard, but does work on about every system.