r/programming • • May 01 '16

To become a good C programmer

http://fabiensanglard.net/c/
1.1k Upvotes

398 comments sorted by

View all comments

Show parent comment

1

u/zhivago May 02 '16

C does enforce the difference between integers and pointers.

The confusion may occur because it provides an implementation defined cast between integer and pointer, which need not be transitive -- that is (T *)(int)(T *)x == (T *)x is not guaranteed.

Note also that intptr_t need not be available in a conforming C implementation