Modifications and bugfix to prevent the program from returning an error code on exit.
This commit is contained in:
parent
6860b93049
commit
191b35631c
1 changed files with 6 additions and 4 deletions
|
|
@ -3,9 +3,11 @@
|
||||||
/*Copy input to output; KNR C exercise 1-6*/
|
/*Copy input to output; KNR C exercise 1-6*/
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
int c;
|
int c = getchar();
|
||||||
|
|
||||||
while ((c = getchar() != EOF))
|
while (c != EOF){
|
||||||
putchar (c);
|
putchar (c);
|
||||||
return 1;
|
c = getchar();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue