Example:
char s[]={'I',' ','a','m',' ','a',' ','g','o','o','d',' ','g','u','y','O'};
char s[]={'I',' ','a','m',' ','a',' ','g','o','o','d',' ','g','u','y',};
Is it always necessary to initialize character array with NUL at the end? Will the second example work if no NUL is added? And also, why do we have to add Nul at the end?
Aucun commentaire:
Enregistrer un commentaire