Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Help... Message-ID: <11249@smoke.BRL.MIL> Date: 10 Oct 89 04:16:12 GMT References: <731@carroll1.UUCP> <39902@bu-cs.BU.EDU> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 23 In article rang@cs.wisc.edu (Anton Rang) writes: -In article <39902@bu-cs.BU.EDU> austin@bucsf.bu.edu (Austin Ziegler) writes: ->dnewton@carroll1.UUCP (Dave 'Yes, I'm weird' Newton) said: ->Dave> #include ->Dave> main () ->Dave> { ->Dave> char h[]; ->Dave> scanf ("%s", h); ->Dave> printf ("%s\n", h); ->Dave> } -> I don't know [ ... ] you can get the same ->result from char *h, and not get too many problems. -[ This is not a flame, just a clarification, OK? ] -There is no difference between "char h[]" and "char *h" in a -declaration; they do exactly the same thing. What is this, comp.lang.c.morons? [ This IS a flame! ] At least Rang got one thing right: -This program fails because there is no storage allocated for the string.