Help...

Doug Gwyn gwyn at smoke.BRL.MIL
Tue Oct 10 14:16:12 AEST 1989


In article <RANG.89Oct9215608 at derby.cs.wisc.edu> rang at cs.wisc.edu (Anton Rang) writes:
-In article <39902 at bu-cs.BU.EDU> austin at bucsf.bu.edu (Austin Ziegler) writes:
->dnewton at carroll1.UUCP (Dave 'Yes, I'm weird' Newton) said:
->Dave> #include <stdio.h>
->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.



More information about the Comp.lang.c mailing list