Is it well-defined to use a pointer pointing to one-past-malloc? – stackoverflow.com

In C, it is perfectly well to make a pointer that points to one past the last element of an array and use it in pointer arithmetics, as long as you don't dereference it: int a[5], *p = a+5, diff = ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "Is it well-defined to use a pointer pointing to one-past-malloc? – stackoverflow.com"