Friday 11 February 2022

C Program To Print SIZE OF DATA TYPES IN C

 SIZE OF DATA TYPES

Code :

#include<stdio.h>

int main()
{
                 printf("===========================================\n");

    printf("\tSize of Data types in Memory\n");
    printf("===========================================\n\n");

    printf("Size of int = %zu Bytes\n", sizeof(int));

    printf("Size of float = %zu Bytes\n", sizeof(float));

    printf("Size of char = %zu Bytes\n", sizeof(char));

    printf("Size of double = %zu Bytes\n\n", sizeof(double));

    printf("-------------------------------------------\n");
   
    return 0;
}
Come again Learn again !

< iCode Buzz />



No comments:

Post a Comment