More C fun ...

brandx at ihtnt.UUCP brandx at ihtnt.UUCP
Wed Dec 7 02:00:23 AEST 1983



Here's another "feature" of C (run under UN*X 5.0 and 4.1BSD):

junk(j)
  int j;
{
  int j=3;  /* duplicate declaration */

  return(j);
}

main()
{
    printf("<%d>\n",junk(5));
}

compiles fine and outputs:

<3>



More information about the Comp.lang.c mailing list