Greeting and thanks for answers!
C programming is for me at first hobby..and i don't say that i am right..i only ask why is it so...!??
As I already mentioned, purely by accident...
Even if it is just a for a hobby, it is a well intended advice that you stop being lazy and get used to do things the proper way.
Computer programming is a precise "business", the computer/CPU will do exactly what you tell it to do, which is not necessarily what you intend to do.
In structure are all elements side by side, every element has his amount and format,... why is it not possible to point in beginning of structure and by sufficient memory to read all elements together..
For a program with a few lines, you might get lucky that it works.
But any change to the struct, be it either by different alignment depending on CPU/OS/compiler or by manual changes of order or adding/removing an element of that struct and "all hell can break loose"...
Please, we don't try to pick on you, we just try to make you aware of a very bad practice/habit you seem to have adopted and show you how to do something the right way...
Ralf