What is the size in bytes of these?
str[]="hey";
str2[]={'h','e','y'}
and
str3[]="h";?
Thanks :)
I don't have a C++ editor running currently. That's why I asked :P
str[]="hey";
is treated as a null terminates string, so the array has one extra byte to hold the null (character zero).
str2[]={'h','e','y'}
is an array of exactly three characters, there is no null terminator.