我尝试了以下
printf ("%c", 236); //236 is the ASCII value for infinity
但我只是在屏幕上得到垃圾输出。
printf 对于小于 128 的 ASCII 值可以正常工作。所以我尝试了以下
printf ("%c", 236u); //unsigned int 236
我仍然只是得到垃圾。那么,我应该怎么做才能让 printf 显示从 128 到 255 的 ASCII 值。
Standard C does not have a symbol for infinite. That's for your implementation (eg. your compiler, your operating system, your terminal and your hardware) to define. Consider that C was designed with portability for systems that use non-ASCII character sets in mind (eg. EBCDIC).