Re: identifier scope in old-style declarations



Eric Sosman wrote:

.... snip ...

For example, how would you describe the error in

#include <stdio.h>
int man(void) {
return puts ("Hello, world!\n") == EOF;
}

? (Yes, this is a trick question.)

What error? The result is linkable, but can't be a program. It
always returns 0, barring a write error. Lacking a header file,
linking will require an extrn statement or equivalent in the
caller.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.


.



Relevant Pages

  • Re: Integer Types
    ... they port it to a different machine. ... The trick is to write it in such a way that it doesn't. ... Why not long int? ...
    (comp.lang.c)
  • Re: Integer Types
    ... The trick is to write it in such a way that it doesn't. ... Why not long int? ... ....we're stuck with the real world, ...
    (comp.lang.c)
  • Re: Integer Types
    ... they port it to a different machine. ... The trick is to write it in such a way that it doesn't. ... Why not long int? ...
    (comp.lang.c)
  • Re: identifier scope in old-style declarations
    ... Eric Sosman wrote: ... int man{ ... this is a trick question.) ... It prints an additional newline;-) ...
    (comp.lang.c)
  • Re: doubles and ints
    ... Bill Cunningham wrote: ... int main { ... exactly what we tell them to, even if it makes no sense: the trick ...
    (comp.lang.c)

Loading