Program to print size occupied by different data types

#include <stdio.h>
#include <limits.h>
int main()
{
int a; 
char b;
float c;
double d;
printf("Storage data type for int data type: %d", sizeof(a));
printf("\nStorage data type for char data type: %d", sizeof(b));
printf("\nStorage data type for float data type: %d", sizeof(c));
printf("\nStorage data type for double data type: %d", sizeof(d));
return 0;
}


Post a Comment

0 Comments