Variable types and size requirement in C with Example Code

// Variable types and size requirement in C
// this program illustrates how to figure out size requirement for a number of variable types in C

#include <stdio.h>
int main(void){
signed char sister;
short romance;
int age;
long life;
long long dino;

printf(“The size of signed char is %d\n”, sizeof(sister));
printf(“The size of short is %d\n”, sizeof(romance));
printf(“The size of int is %d\n”, sizeof(age));
printf(“The size of long is %d\n”, sizeof(life));
printf(“The size of long long is %d\n”, sizeof(dino));
}

 

OutputVarible types and size requirement in C_Image

Leave a Comment

Your email address will not be published. Required fields are marked *