/* File: ascii.c print out the ascii characters. */ #include #include #include"genlib.h" #include"simpio.h" main() { char c ; printf("An ASCII table:\n\n") ; for (c = 0 ; c <= 127; c++) { if (isprint(c)) { /* printable characters */ printf("%3d='%c' ", c, c) ; } else { /* unprintable characters */ printf("%3d= ", c, c) ; } /* print newline every 8 characters */ if (c % 8 == 7) printf("\n") ; } }