Possible Duplicate:
Set all bytes of int to (unsigned char)0, guaranteed to represent zero?
I have the following anonymous union inside a struct:
union
{
unsigned value;
char name[4];
};
Can I replace the following code:
name[0] = 0;
name[1] = 0;
name[2] = 0;
name[3] = 0;
With the following code?
value = 0;