Holes in 2-D array?
Walter Murray
walter at hpclwjm.HP.COM
Tue Feb 7 10:22:51 AEST 1989
Can a multi-dimensional array have holes?
Think of a machine with 8-bit bytes and 32-bit words, and consider
char ca [2][3];
I think of this as an array of two "things", each of which is an
array of three characters. Can there be an unused byte between
the two "things"? In other words, are we guaranteed that
(&ca[0][2] + 1 == &ca[1][0])?
It would seem that a lot of bad things could happen if such holes
could exist, but I can't prove that they can't from the dpANS.
Can someone help?
Thanks.
Walter Murray
More information about the Comp.std.c
mailing list