Program Description:

In this program we will check the size of datatypes in bytes using sizeof() function.

Source Code:

#include<stdio.h>
int main()
 {
    int integer;
    float decimalValue;
    double doubleType;
    char character;
    printf("Size of int: %ld bytes\n", sizeof(integer));
    printf("Size of float: %ld bytes\n", sizeof(decimalValue));
    printf("Size of double: %ld bytes\n", sizeof(doubleType));
    printf("Size of char: %ld byte\n", sizeof(character));
    return 0;
}

Output:



If you have any queries feel free to ask us in the comments section!!