Let's say I have a char array of size 5 and:
char array[5];
for (int i=0;i<5;i++)
{
scanf>>array[i];
}
And I as a user of this program provide "hello" as an input. Where is the \0 stored as character arrays are null terminating in C++ right? Or am I missing something?