Basic Introduction to Programming with C

Each string ends with a special character “\0” which is the null character which indicates the end of the string. So in reality, the array for char name[5] is stored as “Alan\0.” That’s why the array size is 5 instead of 4 to take into account the null character \0. ................
................