#include<stdio.h>
#include<math.h>
void main()
{
char c1='a';
unsigned short j=-1;
int a=3,b=4,c;
float x=2.5;
double s;
long double y;
c=a*b;
s=sqrt(x);
printf ("char:%d,short:%d,int:%d,float:%d,double:%d,long double:%d\n",
sizeof(c1),sizeof(j),sizeof(c),sizeof(x),sizeof(s),sizeof(y));
printf ("c=%d,j=%d,c1-32=%c,s=sqrt(x)=%f\n",c,j,c1-32,s);
}
运行结果:
char:1,short:2;int:4;float:4;double:8,long double:8
c=12,j=65535,c1-32=A,s=sqrt(x)=1.581139