size of datatypes

Size of Data Type

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

printf("Size of int: %d bytes\n", sizeof(int));
printf("Size of float: %d bytes\n", sizeof(float));
printf("Size of double: %d bytes\n", sizeof(double));
printf("Size of char: %d byte\n", sizeof(char));

return 0;
}

OUTPUT


Size of int: 4 bytes
Size of float: 4 bytes
Size of double: 8 bytes
Size of char: 1 byte

 
This website was created for free with Own-Free-Website.com. Would you also like to have your own website?
Sign up for free