Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!dftsrv!nssdcs!setzer From: setzer@nssdcs (William Setzer (IDM)) Newsgroups: comp.lang.c Subject: Declaration Question Message-ID: <394@dftsrv.gsfc.nasa.gov> Date: 24 Jul 89 22:49:01 GMT Sender: news@dftsrv.gsfc.nasa.gov Reply-To: setzer@nssdcs (William Setzer (IDM)) Distribution: usa Organization: NSSDC Greenbelt Md. Lines: 27 Will this declaration: char *foo[K][N]; allocate the following picture? (i.e. Will it initialize the pointers properly and allocate memory for all the blocks shown?) If not, is there a (single) declaration that will? foo | v +-------+ +---...---+ | ptr1 ------> | N chars | +-------+ +---...---+ | ptr2 ------> | N chars | +-------+ +---...---+ | : | | : | | : | | : | +-------+ +---...---+ | ptrK ------> | N chars | +-------+ +---...---+ (Unfortunately, a dbx on my machine proved inconclusive.) Thanx in advance. -- William Setzer setzer@epsl.umd.edu ; My 'real' mail address.