int main(){
int n = 11;
int x = "0123456789"[n%10];
printf("%d\n","abcdefhijk"[n%10]);
printf("%d\n",x);
return 0;
}
答案: 98(b的ASCII码)
49(1的ASCII码)
出自《C traps and pitfalls》
int n = 11;
int x = "0123456789"[n%10];
printf("%d\n","abcdefhijk"[n%10]);
printf("%d\n",x);
return 0;
}
答案: 98(b的ASCII码)
49(1的ASCII码)
出自《C traps and pitfalls》