"Hello" is saved as "Hello\0", "\0" being the NULL terminator.
strlen()
is used to get the length of an array of chars / string.
strlen() takes a pointer to a character, and walks the memory from this character on, looking for a NULL character. It counts the number of characters before it finds the NULL character.
=5
sizeof()
is used to get the actual size of any type of data in bytes.
Hence it would include the NULL terminator as well.
=6.
if(sizeof(string) <= strlen(string))
if-condition fails, so print 0.