Xref: utzoo comp.lang.c:27682 comp.unix.xenix:10985 Path: utzoo!censor!geac!jtsv16!uunet!sco!rogerk From: rogerk@sco.COM (Roger Knopf 5502) Newsgroups: comp.lang.c,comp.unix.xenix Subject: Re: pointers - why dosn't this work? Summary: slight correction Message-ID: <4134@scorn.sco.COM> Date: 5 Apr 90 23:23:52 GMT References: <6067@ozdaltx.UUCP> <23467@mimsy.umd.edu> Sender: news@sco.COM Reply-To: rogerk@sco.COM (Roger Knopf 5502) Distribution: usa Organization: The Santa Cruz Operation, Inc. Lines: 24 In article <23467@mimsy.umd.edu> dbk@mimsy.umd.edu (Dan Kozak) writes: >From article <6067@ozdaltx.UUCP>, by root@ozdaltx.UUCP (root): >> #include >> #include >> main() >> { >> char b[1][20]; >> char *x="This is a test"; >> char *a[3]; > ^^^^^ this is a pointer to an array of 3 chars, but the > array(s) that it points to have not been allocated > and it hasn't itself been initialized. Your concept is right but it is actually an array of 3 pointers to char. The result is still the same - these pointers are unitialized and point to who-knows-what. Roger Knopf SCO Consulting Services -- "His potential clients were always giving him the business." --Robert Thornton