在C语言中,字符型和整型可隐式转换.如下: int a='A'; printf("%3c",a); 输出为A; 而且在数组下标中,字符变量也可以使用. 例如 arr['1'-'0']==arr[1]. 相关文章: