The Importance of Data Type
It is a technique which decides the type of data should consider while performing the different operation on different data.
Why Data Types are important
1. The main role of data type is to determine the role of operations to be performed on data. The only thing they do is to process data. To perform the proper operation on data the entered must be converted into some type of data that conforms to the requirements of the algorithm that solves the problem (and that is converted into a computer program by encoding it into some programming language).
2. In program languages without declaring data types, the burden is on the interpreter / compiler to do all the necessary operations the scenes to optimally map our computation to the underlying hardware. Data types are always important part for the language abstraction.
Syntax: <Data Type><Variable Name>=Some Value
Example:- int a=10;
As mentioned in above example int ‘a’is integer type of data also ‘a’ is name of variable which only accepts integer value. Here we have already defined the value of variable ‘a’ is equal=10;
Different types of Data
This type of data only accepts integer value.
For Example:- int x=10.
This type of data accepts only character value.
For Example:- char c=20.
This type of data accepts only floats value.
For Example:- float f=1.32
It is nothing but collection of same data type of that are in group of elements to perform any particular operation on data.
For More Information:
Call us @ 9825618292
Visit us @ http://tccicomputercoaching.com