Wikipedia

Hasil penelusuran

Kamis, 19 November 2015

Structures in C

Structure is another user defined data type available in C that allows to combine data items of different kinds.

 To define a structure, 
you must use the struct statement.
 The struct statement defines a new data type, with more than one member. 
The format of the struct statement is :

struct [structure tag] {     //*structure tag is optional

   member definition;
   member definition;
   ...
   member definition;
} [one or more structure variables];  //*one or more structure variables also optional

 And an Example of how to use Structure :







Structures as Function Arguments


You can pass a structure as a function argument in the same way as you pass any other variable or pointer.
and it can be simplified like this : 




more at : www.tutorialspoint.com





Tidak ada komentar:

Posting Komentar