打印扩展的ASCII字符

#include stdio.hint main( void ){unsigned char mychar;/* Must be unsigned for extended ASCII */

编程学习网为您整理以下代码实例,主要实现:打印扩展的ASCII字符,希望可以帮到各位朋友。

#include <stdio.h>

int main( voID )
{
    unsigned char mychar;    /* Must be unsigned for extended ASCII */
    /* Print extended ASCII characters 180 through 203 */

    for (mychar = 180; mychar < 204; mychar++)
    {
        printf("ASCII code %d is character %c\n", mychar, mychar);
    }

    return 0;
}
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐