1) array[0] would point to a garbage location as there is no first element, so it is not useful.
2) The issue with returning an array is scope, the array will be defined within the function (unless on the heap with malloc()) and will be invalid after the function completes.
3) I have tried to explain this,
Quote
what does it really mean?
It will initialize the first element to zero, not the rest. However, as you had only initialized name[0], the rest must be initialized and defaults to zero. You can see = {0} as a shortcut to typing = {0,0,0,0,0,0,0,0,0,0,0,0...}
For example, this will not work:
char name[LEN] = {'a'};
It will only initialize name[0] to 'a', the rest will default to zero unless you state otherwise. memset could be used for example to set everything to a non-zero value for integral types.
Quote
The name array is supposed to contain characters but I'm using a constant value which is "0".
Please, remember that characters like 'a' and 'b' are really integers, they are ASCII code points. Therefor any value between 0..127 is a valid char.
You can think of char as a single byte integer, however with special treatment (we can use 'a' instead of remembering each ASCII codepoint, and use "abcde" instead of {'a','b','c',...}
Please feel free to ask for any clarification if I am unclear on some things.
Alexander.