What is the default value of members of a char array in C?
Say I create a char array, and I assume the char array is empty. If I check the value of the first element in the array ( arr[0] ), what would be the result of this expression? It depends on where and how the array is declared. If the array is declared at file scope (outside of any function), or is declared static , and does not have an explicit initializer, then the contents of the array will be initialized to 0. If the array is declared at block scope (within a function or block) and is not declared static , and does not have an explicit initializer, then the contents of the array are