C Data Types: Data Type Can Be Classified As Follows
C Data Types: Data Type Can Be Classified As Follows
C Data Types
C data types indicates what type of data to be stored and what is the range of data that we can store or
carried out on those particulars.
Integer and char having two types of register i.e. signed and unsigned.
If the sign qualifier is not mentioned then by default signed register is assumed.
In case of char if the sign qualifier is not mentioned then the type of char is signed or unsigned depends
upon machine. The size of different data type along with their format specifier are mentioned below:
Quick Solution: Quick Solution For You… (www.qsoln.com) |By: Arvind Kumar Page 5
3. C Data Types
#include<stdio.h>
int main()
{
printf("size of char=%d\n",sizeof(char));
printf("size of float=%d\n",sizeof(float));
printf("size of double=%Ld\n",sizeof(double));
printf("size of long double=%Ld\n",sizeof(long double));
We have a concepts of C Data Types but have you think, Why we uses data types?. If such question are
coming in your mind then I can say you have learnt something from this tutorials. Now, data types are
used to identify and classify difference types of data. Which helps to perform different types of operation
based on the data.
Example:
What will be the results of the following expression
“4*4+5%2”
Computer doesn’t know about the above expression. We have to teach each part to the computer to
perform the operation. Which is done by the program with the help of data types. So Data types are very
simple but useful concept for the programming language.
Quick Solution: Quick Solution For You… (www.qsoln.com) |By: Arvind Kumar Page 6