Hi guys, in this section we will discuss Reference Data Types and their types also. This section is essential because it is also considered a long question for Computer Science subjects. So without wasting time let's get started.
Reference data type:
There are two types of reference data types such as:
- Derived Data Type
- User-Defined Data Type
Derived Data Types:
- Those data types whose variables allow us to store multiple values of the same type are known as Derived Data Types.
- But they never allow storing multiple values of different data types.
- The derived data type can achieve by using the concept of an array.
- For example:
- int a[] = {10,20,30}; // Valid
- int b[] = {'A',100,"ABC"}; // Invalid
User-Defined Data Types:
- Those data types which variable allows us to store multiple values of same type or different type or both, are known as user data types.
- User-defined data types are developed by programmers.
- Examples:
- Structure
- Union
- Enumeration etc.
That's all for this section, you can also watch videos on YouTube for more information about this concept.