Re: odd behavior with Character Arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maybe this is already clear from the answer Jędrzej gave. But in case it isn't:

Rohit Arul Raj wrote:
Does that mean, that if the size of the array is specified, it appends
'\0' and if it is not specified then it does not append '\0'?
Can you/anyone clarify this point?

The '\0' are appended only because the specified size is larger than the number of initial values.

If you don't specify a size, then the size is the number of initial values, not some amount larger than the number of initial values.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux