Saturday, August 30, 2014

valid and invalid pointer arithmetic


Valid pointer arithmetic


Pointer address + Number = address
Pointer address - Number = address
Pointer address - Number = address


invalid pointer arithmetic


Pointer address + Pointer address  = Illegal
Pointer address * Pointer address  = Illegal
Pointer address / Pointer address  = Illegal
Pointer address % Pointer address  = Illegal
Pointer address & Pointer address  = Illegal
Pointer address | Pointer address  = Illegal
Pointer address ^ Pointer address  = Illegal
~ Pointer address  = Illegal


Reference:

No comments:

Post a Comment