People download images with watermarks instead of writing this.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Ce dépôt est archivé. Vous pouvez voir les fichiers et le cloner, mais vous ne pouvez pas pousser ni ouvrir de ticket/demande d'ajout.

24 lignes
701B

  1. /* ascii.c - The ASCII Table
  2. * @BAKE cc $@ -o $* $+
  3. */
  4. #include <stdio.h>
  5. #include <uchar.h>
  6. int main(void)
  7. {
  8. unsigned int c;
  9. const char codes[32][4] =
  10. { "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", "BS", "TAB", "LF",
  11. "VT", "FF", "CR", "SO", "SI", "DLE", "DC1", "DC2", "DC3", "DC4", "NAK",
  12. "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" };
  13. puts(" DEC HEX OCT");
  14. for (c = 0; c < 127; ++c) {
  15. if (c == 127)
  16. { printf( "DEL %4u %4x %4o\n", c, c, c); }
  17. else if (c > 31)
  18. { printf("'%c' %4u %4x %4o\n", (char16_t) c, c, c, c); }
  19. else
  20. { printf( "%3s %4u %4x %4o\n", codes[c], c, c, c); }
  21. }
  22. }