Free
|
C language is a middle level language. It is a structured language. C language is a case sensitive language. All syntax written in c language is in lower case. C is the basis for C++.
|
|
|
|
Structures & Unions in C : - C Programming Tutorial
A structure is a collection of variables under a single name where variables can be of different types.
It
contains number of data types grouped together.
These data types may or may not be of same type.
Example : typedef struct
{ char hobb[128]; } person; We can pass structures as arguments to functions. We can also make structure within a structure.
struct
date Use of Typedef in C language
C provides a facility called typedef for creating
new data type names. typedef means you no longer have to write struct all over the place.Typedefs can make your code more clear. Typedefs can make your code easier to modify
Similarly, typedef can be used to define a class
type (structure, union etc). For example:
Pointers to Structures.
Malloc function. Dynamic memory
allocation
|
|