Modifications and bugfix to prevent the program from returning an error code on exit.

This commit is contained in:
Reina Harrington-Affine 2025-08-09 23:14:04 +00:00
parent 6860b93049
commit 191b35631c

View file

@ -3,9 +3,11 @@
/*Copy input to output; KNR C exercise 1-6*/
int main(){
int c;
int c = getchar();
while ((c = getchar() != EOF))
putchar (c);
return 1;
while (c != EOF){
putchar (c);
c = getchar();
}
return 0;
}