c - Accessing out of declared boundary on members of structure or each dimension of multi-dimensional array -
can give me example statement. read somewhere, mentioned kind of pointer usage not recommended.
"accessing out of declared boundary on members of structure or each dimension of multi-dimensional array."
this boils down accessing outside array bounds:
int array[100]; int* pointer = array; *(pointer + 100) = 0; // undefined behavior - last valid index 99 int value = *(pointer + 200); //undefined behavior
any attempt access elements outside of array leads undefined behavior ,ight crash program, corrupt data, whatever else. that's not call not recommended, that's call never that.
Comments
Post a Comment