I have a struct declaration in a header file:
In my C file I have the include for my header:Code:// myheader.h: struct testStruct { char myChar; int myInt; char array[200]; } myStruct;
Anyway, I noticed that the values in my struct were all initialized to zero already. Is this just something my compiler decided to do? Should I go about initializing all the values to zero before I start using the struct, or is this part of the C89 standard or something?Code:#include "myheader.h" int main() { extern testStruct myStruct; ..... return 0; }