Data structure is a way to store and organize data in order to facilitate access and modifications.
A user-defined data type is a group of primitive data types defined by the programmer. For example, in C programming language, a user can define a new data type using typedef keyword (typedef int age)
- create a new empty container (constructor)
- report the number of objects it stores (size)
- delete all the objects in the container (clear)
- insert new objects into the container
- remove objects from it
- provide access to the stored objects
A record structure is a join of elements of arbitrary types, that are possibly themselves structured types. For example, a Person record may contain fields like FirstName, LastName, Birthday, Person (reference to his children) and so on.
- Integer - stores whole numbers and signed numbers
- Floating-point - store real numbers (fractional values)
- Character - store characters (for example names of things)
- Boolean - store a true or false value