Global variables, which has static storage duration, are implicitly initialized.
Local variables, having automatic storage duration are not initialized unless done explicitly. However, if local variable has static storage class, it is initialized.
Quoting C11
,
If an object that has automatic storage duration is not initialized explicitly,its value is indeterminate. If an object that has static storage duration is not initialized explicitly, then:
— if it has pointer type, it is initialized to a null pointer;
— if it has arithmetic type, it is initialized to (positive orunsigned) zero;
— if it is an aggregate, every member is initialized (recursively) according to these rules;
— if it is a union, the first named member is initialized (recursively) according to these rules.