C Program To Print The Size Of Different Data Types In C

C Program To Print The Size Of Different Data Types In C

Example

#include<stdio.h>

void main() {
    printf("n Data Type t Size(byte)");
    printf("n Charactert    %d", sizeof(char));
    printf("n Integer  t    %d", sizeof(int));
    printf("n Long int t    %d", sizeof(long int));
    printf("n Float    t    %d", sizeof(float));
    printf("n Double   t    %d", sizeof(double));
    printf("n Long Double    %d", sizeof(long double));
}

Output:

c-program-output-to-print-the-size-of-different-data-types-in-c

Leave a comment