显示月份的代码用这个呢?
int i;char *p[13]={"","一","二","三","四","五","六","七","八","九","十","十一","十二"};scanf("%d",&i);printf("%s",p[i]);同意!!直接用数组就可以转换,不需要程序!!!
斑竹不厚道,至少介绍下这个函数的功能吧
int i=0;char ch=(char)i;int类型为两字节(4字节)char类型为单字节当int类型数据大于255时将不能转换~~