Path: utzoo!attcan!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.lang.c Subject: Re: Portability help Keywords: portability, MS-DOS, UNIX, wierd Message-ID: <2036@solo9.cs.vu.nl> Date: 13 Feb 89 19:46:36 GMT References: <376@lakesys.UUCP> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 19 davek@lakesys.UUCP (Dave Kraft) writes: \... \ char a, b, c, d, e; \... \ printf("\n>>%s<<", &a); ^^ You're telling printf() to expect a string, i.e. the address of the first of a sequence of bytes, TERMINATED BY A '\0' BYTE; instead you supply printf() with the address of 1 char. Use `%c' and delete the `&'. \... \ if(x == EOF) \ printf("\nInput stream empty."); \ else; ^ Probably you didn't intend that. -- "I love it |Maarten Litmaath @ VU Amsterdam: when a plan comes together." |maart@cs.vu.nl, mcvax!botter!maart