🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5703

Holes in 2-D array?

#5703
From: Walter Murray
Date: Tue, 07 Feb 1989 00:22
18 lines
904 bytes
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
Technical Details
Message-ID: <12570007@hpclwjm.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!agate!ucbvax!decwrl!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!agate!ucbvax!decwrl!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter
From: walter@hpclwjm.HP.COM (Walter Murray)
Newsgroups: comp.std.c
Subject: Holes in 2-D array?
Message-ID: <12570007@hpclwjm.HP.COM>
Date: 7 Feb 89 00:22:51 GMT
Organization: Hewlett-Packard Calif. Language Lab
Lines: 18