// Read characters until eof // Andrew Taylor - andrewt@unsw.edu.au // 22/4/2019 #include int main(void) { // getchar returns an int which will contain either // the ASCII code of the character read or EOF int ch = getchar(); while (ch != EOF) { printf("you entered the character: '%c' which has ASCII code %d\n", ch, ch); ch = getchar(); } return 0; }