C examples for Data Type:sizeof
Get the type size
#include <stdio.h> #include <stdlib.h> int main( void ) { printf("int %d", sizeof(int)); printf("short %d", sizeof(short)); printf("long %d", sizeof(long)); printf("long long %d", sizeof(long long)); printf("float %d", sizeof(float)); printf("double %d", sizeof(double)); return 0;//from ww w.j ava 2s .co m }