j

Monday, 2 November 2015

Write a program that displays the sizes of different data types



#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("Size of char = \n",sizeof(char));
printf("Size of int = \n",sizeof(int));
printf("Size of unsigned int = \n",sizeof(unsigned int));
printf("Size of short int = \n",sizeof(short int));
printf("Size of long int = \n",sizeof(long int));
printf("Size of unsigend long int = \n",sizeof(unsigned long int));
printf("Size of float = ",sizeof(float));
printf("Size of double = ",sizeof(double));
printf("Size of long double = ",sizeof(long double));
getch();
}

Subscribe to this Blog via Email :