Hello,
Good question that is because we use a NULL terminator which is basically a byte thats equal to zero. This is what tells printf that a string has ended. When ever you define a string in C a NULL terminator is automatically prepended in memory. For example if we did printf("Hello"); the Hello looks like this in memory 'H', 'e', 'l', 'l, 'o', 0x00
Does that answer your question?