Hacker News new | ask | show | jobs
by tinus_hn 1900 days ago
I’m pretty sure you have to take the size of the objects in mind.
2 comments

No, these are equivalent.

The size of the objects is implicitly taken into account by the compiler, it knows the size of the objects by the type of the pointer.

"Pointer arithmetic" takes care of that. Adding an integer to a pointer will multiply the size of the type pointed to by the integer and adds that to the pointer.