memset((char *) &ordr_mstr,'\0',sizeof(struct ordr_mstr_));
memset((char *) &ordr_mstr,'\0',sizeof(struct ordr_mstr_));
ordr_mstr is being set to all zeros.
It is too clear and so it is hard to see.
A dunce once searched for fire with a lighted lantern.
Had he known what fire was,
He could have cooked his rice much sooner.
If the structure has non-numeric fields, then they'll be set to nulls, not zeros.
> If the structure has non-numeric fields, then they'll be set to nulls, not zeros.
Wrong way round.
All bits zero does NOT infer a NULL pointer, or a 0.0 floating point constant.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
'\0' == 0
You can say that without watching your wording, Elysia. Its actually more of a syntax issue than anything. I guess its considered more human readable. Though for some reason here people will debate to the bitter end the merit of using '\0'.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*