Given the following declaration:
char inputBuffer[12];
What is the default value of either char within the array? I\'m interested in knowing thi
The array elements have indeterminate value except if the array it is defined at file-scope or have static
storage-class specifier then the array elements are initialized to 0
.
#include
char inputBuffer1[12]; // elements initialized to 0
static char inputBuffer2[12]; // elements initialized to 0
void foo(void)
{
char inputBuffer3[12]; // elements have indeterminate value!
static char inputBuffer4[12]; // elements initialized to 0
}