[char] Size Total:1
[int] Size Total:4
[long int] Size Total:4
[float] Size Total:4
[double] Size Total:8
[long double] Size Total:12
[double point]Size Total:4
[char point] Size Total:4
SUN Ultra10 Solairs8(32bit)GUNgcc:
[char] Size Total:1
[int] Size Total:4
[long int] Size Total:4
[float] Size Total:4
[double] Size Total:8
[long double] Size Total:16
[double point]Size Total:4
[char point] Size Total:4
#include <math.h>
#include <stdio.h>
main()
{
char c;
int i;
long int j;
float k;
double l;
long double m;
char *cp;
double *lp;
printf("[char] Size Total:%dn",sizeof(c));
printf("[int] Size Total:%dn",sizeof(i));
printf("[long int] Size Total:%dn",sizeof(j));
printf("[float] Size Total:%dn",sizeof(k));
printf("[double] Size Total:%dn",sizeof(l));
printf("[long double] Size Total:%dn",sizeof(m));
printf("[double point]Size Total:%dn",sizeof(cp));
printf("[char point] Size Total:%dn",sizeof(lp));
printf("nThe done.n");
getc(stdin);
}
联系客服