int main()
{
char a[7] = \"Network\";
return 0;
}
A string literal in C is terminated internally with a nul charac
In the early days of C and Unix, memory and disk were small, so not storing the NUL byte at the end of the string was actually a technique that was used. If the string variable is seven characters long, you could store a seven-character string in it, and since seven was the max length, you knew the string ended there, even without the terminator character. This is why strncpy works the way it does.