Program to Calculate Size of Basic Datatypes in C | Basic Datatypes Size in C | Basic C Datatypes

Spread the love

/**************Program*****************/


#include<stdio.h>

void main()
{
    int i;
    char ch;
    long int li;
    float f;
    double d;   
    long double ld;

printf(“nSize of Datatypes n”);


printf(“n size of Integer Datatype is %d”,sizeof(i));


printf(“n size of Character Datatype is ch= %d”,sizeof(ch));


printf(“n size of Long Integer Datatype is li = %d”,sizeof(li));


printf(“n size of Float Datatype is f= %d”,sizeof(f));


printf(“n size of Double Datatype is d= %d”,sizeof(d));


printf(“n size of Long Double Datatype is ld= %d”,sizeof(ld));


getch();

}


/*****************OUTPUT********************/


Venkatesh Macha

Hi Guys, I am Venkatesh Macha. I am a programmer and an Open Source enthusiast, Presently working as a Software Engineer. Apart from that, I love to explore new technologies and things.

You may also like...

Leave a Reply