C Program to find the size of int float double and char

Write a C program to find the size of int or integer, float, double, and char or character with an example. In C programming, we have a sizeof operator which allows us to print or get the size of any data type.

#include <stdio.h>

int main()
{   
    printf("Size of a Character = %ld Byte", sizeof(char));

    printf("\nSize of an Integer  = %ld Byte", sizeof(int));

	printf("\nSize of a Float     = %ld Byte", sizeof(float));

	printf("\nSize of a Double    = %ld Byte\n", sizeof(double));

    return 0;
}
C Program to find the size of int float double and char