Recently I saw a code that initilizes a struct using {0} .My question is if this works for all elements of the struct or just the 1st one. Example:
.H File:
typedef struct
{
UINT32 size;
UINT16 num1;
UINT8 * p_buffer;
} MY_RECORD;
--------------
.C File:
...
MY_RECORD my_var = {0};
.H File:
typedef struct
{
UINT32 size;
UINT16 num1;
UINT8 * p_buffer;
} MY_RECORD;
--------------
.C File:
...
MY_RECORD my_var = {0};