C program to print the size of different data types

Program

#include<stdio.h>
#include<conio.h>

void main()
{
clrscr();
printf(“TypettttSize (bytes)”);
printf(“nCharacterttt    %d”,sizeof(char));
printf(“nIntegertttt    %d”,sizeof(int));
printf(“nLong intttt    %d”,sizeof(long int));
printf(“nFloattttt    %d”,sizeof(float));
printf(“nDoubletttt    %d”,sizeof(double));
printf(“nLong doublettt    %d”,sizeof(long double));
getch();
}

Output

C program to print the size of different data types

Leave a Comment

error: Alert: Content is protected!!