C Program to Find out the size of the different data types

C Program to find the Size of Different data types. In This program we, find the size of the datatypes in c using sizeof() operator. sizeof() operator returns the its argument memory in bytes. Read more about C Programming Language .

/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/





#include <stdio.h>
main()
{

printf(" short int is %2d bytes n", sizeof(short int));
printf(" int is %2d bytes n", sizeof(int));
printf(" int * is %2d bytes n", sizeof(int *));
printf(" long int is %2d bytes n", sizeof(long int));
printf(" long int * is %2d bytes n", sizeof(long int *));
printf(" signed int is %2d bytes n", sizeof(signed int));
printf(" unsigned int is %2d bytes n", sizeof(unsigned int));
printf("n");
printf(" float is %2d bytes n", sizeof(float));
printf(" float * is %2d bytes n", sizeof(float *));
printf(" double is %2d bytes n", sizeof(double));
printf(" double * is %2d bytes n", sizeof(double *));
printf(" long double is %2d bytes n", sizeof(long double));
printf("n");
printf(" signed char is %2d bytes n", sizeof(signed char));
printf(" char is %2d bytes n", sizeof(char));
printf(" char * is %2d bytes n", sizeof(char *));
printf("unsigned char is %2d bytes n", sizeof(unsigned char));
}
Read more  C Programs
Array In C

Simple C Programs

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

Leave a Reply