下面是一个类型为char
的算术运算示例:
#include <stdio.h>
int main(void)
{
char letter = 'C'; // letter contains the decimal code value 67
printf("The character is %c/n", letter);
letter = letter + 3; // letter now contains 70, which is 'F'
printf("The character is %c/n", letter);
return 0;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266605.html