#include <stdio.h>

int c;

int main(void) {
  // c='A' significa che a c viene assegnato il codice ASCII di 'A'
  // c<='Z' significa che c è minore o uguale al codice ASCII di 'Z'
  // c++ incrementa di 1 il codice ASCII in c memorizzato
    for( c='A' ; c<='Z' ; c++) {
        // c viene stampato sia come intero ovvero codice ASCII
        // sia come carattere il cui codice ASCII è c
        printf("%d --> %c\n", c, c);
    }
    printf("\n");
}

/* STAMPA:
65 --> A
66 --> B
67 --> C
68 --> D
69 --> E
70 --> F
71 --> G
72 --> H
73 --> I
74 --> J
75 --> K
76 --> L
77 --> M
78 --> N
79 --> O
80 --> P
81 --> Q
82 --> R
83 --> S
84 --> T
85 --> U
86 --> V
87 --> W
88 --> X
89 --> Y
90 --> Z
*/

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: