Paul Theodoropoulos writes:

At 06:50 PM 01-26-2003, Sam Varshavchik wrote:
Yes. Forgetting to install the binary is quite common, though.
Perhaps your putchar sign-extends even if you explicitly cast the character.
Try ignoring the return value from putchar() completely.
If printf("[%d]\n", putchar((int)(unsigned char)255)); shows -1, you've got a major stdio bug.
forgive my ignorance - i'm not a programmer - how exactly do i generate output from the above? i tried dumping that expression into a file called 'code.c' and running gcc on it, but i get

code.c:1: parse error before string constant
code.c:1: parse error before numeric constant

again - no programming smarts here, just an administrator.
#include <stdio.h>

int main()
{
  printf("[%d]\n", putchar((int)(unsigned char)255));
}


Reply via email to