Why We need to create data type?

Let's talk about the data type. Why We need to create data type?

Data type cannot be consume directly because a data type does not have any memory for storing a value so, to consume a data type first we need to create the copy of type for which the memory is allocated . Just look the below example you will get to know what I mean.

The rule data type cannot be consumed directly this applies to both predefined as well as user defined type also So, if we want to consume our data type first we need to create the copy of them

Note*:-Generally copy of simple type (int) are known as variables whereas copy of complex type (Structure, Class) are known as Instances.


No comments:

Post a Comment