Introduction To Data Types In "C"

functions of different types. The type of a variable determines how much space
it occupies in storage and how the bit pattern stored is interpreted:
The Description Is Given Below In Picture:-
The array and structure types are referred collectively as the aggregate
types. The type of a function specifies the type of the function's return value.
We will see the basic types in the following section, whereas other
types will be covered in the upcoming Post..
Integer Types:-
we all are familiar about integer no .. they are mathematical no's
As for Examples:-1,2,3,13.
the chart of size of integer variable is given below:-
As for Examples:-1,2,3,13.
the chart of size of integer variable is given below:-
To Find Exact Size Of Type And Variable You Can Run Following Program:
#include<stdio.h>
#include<conio.h>
#include<limits.h>
void main()
{
printf("Storage Size of Iinteger is=%d",sizeof(int));
getch();
}
The expressions sizeof(type) yields the storage size of#include<conio.h>
#include<limits.h>
void main()
{
printf("Storage Size of Iinteger is=%d",sizeof(int));
getch();
}
the object or type in bytes
Float Type Variable:-
when decimal is placed in integer value is known as floating-point variable
for example 3.14,3.100 etc.

Program For Finding Exact Size Of
Float :-
#include<stdio.h>#include <float.h>
#include<conio.h>
void main()
{
printf("Storage size for float : %d \n", sizeof(float));
printf("Minimum float positive value: %E\n", FLT_MIN );
printf("Maximum float positive value: %E\n", FLT_MAX );
printf("Precision value: %d\n", FLT_DIG );
getch();
}
The header file float.h defines macros that allow you to use these values and{
printf("Storage size for float : %d \n", sizeof(float));
printf("Minimum float positive value: %E\n", FLT_MIN );
printf("Maximum float positive value: %E\n", FLT_MAX );
printf("Precision value: %d\n", FLT_DIG );
getch();
}
other details about the binary representation of real numbers in your programs
The Void Type :-
void means no value . this type specifies that there will not any valuethe void is used under following condition:-
Comments
Post a Comment