Size of Data Types – C

#include<stdio.h>
#include<conio.h>
int main()
{

printf("nVariables of int datatype occupy %d bytes", sizeof(int));

printf("nVariables of float datatype occupy %f bytes", sizeof(float));

printf("nVariables of double datatype occupy %e bytes", sizeof(double));

printf("nVariables of char datatype occupy %c bytes", sizeof(char));

printf("nVariables of boolean datatype occupy %i bytes", sizeof(_Bool));

return 0;
}

Scroll to top