How to check data size of variable

How to check data size of variable


#include<stdio.h>
int main()
{

int a;
char b;

printf("size of a=%d\nsize of b=%d",sizeof(a),sizeof(b));
}


output:

size of a=2
size of b=1





0 Comments