Showing posts with label Program to print the range of data types in c. Show all posts
Showing posts with label Program to print the range of data types in c. Show all posts

Program to print the range of data types in c

//Program to print the range of data types in c
#include<stdio.h>
#include<conio.h>
#include<limits.h>
int main()
{
clrscr();
printf("int %%d %d %d to %d",
sizeof(int),INT_MIN,INT_MAX);
printf("\nchar %%d %d %d to %d",
sizeof(char),CHAR_MIN,CHAR_MAX);
printf("\nlong %%d %d %d to %d",
sizeof(long),LONG_MIN,LONG_MAX);
printf("\nshort char %%d %d %d to %d",
sizeof(short char),SCHAR_MIN,SCHAR_MAX);
printf("\nint %%d %d %d to %d",
sizeof(short),SHRT_MIN,SHRT_MAX);
getch();
return 0;

}