There is a training little pattern output by character. Program:

#include <stdio.h> #include <stdlib.h> main() { int c; while (c = getchar() != EOF) putchar(c); system("PAUSE"); } 

The problem is that it displays this: alt text

so it should be?

  • attentiveness and only attentiveness, thank you. - Stee1House
  • @steelhouse, please remember to accept the answer as correct. - Stanislav Pankevich

1 answer 1

Try while ((c = getchar()) != EOF)