Define data type and their types with example
swetha12:
Storage representations and machine instructions to handle constants differ from machine to machine .the variety of data types available allow the programmer to select the type appropriate to the needs of the application as well as the machine.C language is rich in its data types.Three types of datatypes.1. primary data types 2. derived data types 3. user defined data types
Answers
Answered by
13
Data type ... Most programming languages support various types of data, for example: real, integer or Boolean. A Data type provides a set of values from which an expression (i.e. variable, function ...) may take its values.
Answered by
14
the type of data that a variable can store is called datatype.
some examples are
int-to store integer values
double/float - to store decimal values
char-to store characters
long- to store long values of int or double or float type etc.
say int a;the variable a stores int values
float b;can store values such as 3.67
char c; can store values as 'a' etc
some examples are
int-to store integer values
double/float - to store decimal values
char-to store characters
long- to store long values of int or double or float type etc.
say int a;the variable a stores int values
float b;can store values such as 3.67
char c; can store values as 'a' etc
Similar questions