Implemented exercise 1-6 for additional testing and modification.
This commit is contained in:
parent
fc658ddb69
commit
79b0940502
1 changed files with 11 additions and 0 deletions
11
KNR C/ex1_6-getchar.c
Normal file
11
KNR C/ex1_6-getchar.c
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
/*Copy input to output; KNR C exercise 1-6*/
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
int c;
|
||||||
|
|
||||||
|
while ((c = getchar()) != EOF)
|
||||||
|
putchar (c);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue