强制类型转换

#include<stdio.h>
void main()
{
int i=2;
float j=3.14;
printf("i=%f,j=%d\n",(float)i,(int)j);
}

 

 

 

 

posted on 2019-12-16 19:03  张德明  阅读(109)  评论(0)    收藏  举报