Find the Size of data types in C language

#include <stdio.h>
int main()
{
    char charSize;
    short shortSize;
    int intSize;
    long longSize;
    float floatSize;
    double doubleSize;

    printf("Size of char: %ld byte\n", sizeof(charSize));
    printf("Size of Short: %ld bytes\n", sizeof(shortSize));
    printf("Size of int: %ld bytes\n", sizeof(intSize));
    printf("Size of long: %ld bytes\n", sizeof(longSize));
    printf("Size of float: %ld bytes\n", sizeof(floatSize));
    printf("Size of double: %ld bytes\n", sizeof(doubleSize));
    return 0;
}

 

Output:-

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