The derived or secondary data type is derived from the fundamental data type. Following data types are kept in this category –
— Array
— Pointer
— String
— Struct
— Union
Below i have given only introduction.You will get detail about derived data types in respective chapters in this course.
Array is the collection of similar data type elements.
Example
char number[5]={10,20,30,40,50};
here number is an array of five elements of char data type.
Collection of heterogeneous data type elements.
1 2 3 4 5 6 7 8 9 10 11 |
struct emp { char name[20]; unsigned int roll_no; float marks; }emp1; |
Here emp1 is an structure variable which has all data type elements.
unsigned int *ptr_var;
So here ptr_var is a pointer variable of unsigned int type which can hold the address of same data type variable.
Please see the respective chapters for more detail.