#include <stdio.h>

char str[] = "Inge\0gneria"; 
// ho messo un terminatore al 5o carattere
// tutto il resto nella stringa viene ignorato

// conta caratteri nella stringa (ovvero la sua lunghhezza))
int main() {
    int i;
    
    for(i=0; str[i] != 0; i++) {
        printf("str[%d] = %c\n",i,str[i]); // stampo l'i-esimo carattere della stringa
    }
}

Embed on website

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