Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!davis From: davis@pacific.mps.ohio-state.edu ("John E. Davis") Newsgroups: comp.lang.c Subject: Is this ok?? Message-ID: Date: 7 Mar 91 02:35:46 GMT Sender: news@pacific.mps.ohio-state.edu Reply-To: davis@pacific.mps.ohio-state.edu (John E. Davis) Distribution: comp Organization: "Dept. of Physics, The Ohio State University" Lines: 38 Hi, The following code works on sun4 and ultrix but crashes on VMS. Just when I thought I understood pointers..... #include void fm2(s) char **s; { *s = "Hello\n"; } void fm1(s) char **s; { char *ss; fm2(&ss); *s = ss; } int main() { char *s; fm1(&s); (void) fputs(s,stdout); return(0); } I expect to `hello' but I fail on VMS. I get a `symbolic dump stack ...'. What is wrong??? Thanks, -- John bitnet: davis@ohstpy internet: davis@pacific.mps.ohio-state.edu