The original address is here: http://www.cnblogs.com/Anker/p/3545146.html
I only wrote the main introduction and the code here.
Sequential initialization
In textbooks, C language structure initialization is in the order of the way, there is no way to deal with the chaotic sequence. The sequential initialization of the struct must be in accordance with the order of the members, indispensable, if the structure is larger, prone to errors, and the form is not intuitive, you can not see the values of each struct data member.
form like; data_t data={10,20}
Random sequence Initialization
Chaotic initialization is a new addition to the C99 standard, a more intuitive way to initialize. In the case of sequential initialization, the sequence initialization is like its name, the members can be initialized in order, and only some members can be initialized, and the extensibility is better. The Linux kernel initializes the struct in this way.
There are two ways to initialize a random sequence, one is to use a dot (.) symbol, and one is to use a colon (:). Mode 1 is the C99 standard, and Mode 2 is the extension of GCC, and it is strongly recommended to use the first method.
Linux under C struct initialization