codecamp

isgraph

 原型:extern int isgraph(int c);
 
 用法:#include <ctype.h>
 
 功能:判断字符c是否为除空格外的可打印字符
 
 说明:当c为可打印字符(0x21-0x7e)时,返回非零值,否则返回零。
 
 举例:


     // isgraph.c
     
     #include <syslib.h>
     #include <ctype.h>
     main()
     {
       int c;
       
       clrscr();        // clear screen
       c='a';
       printf("%c:%s\n",c,isgraph(c)?"yes":"no");
       c=' ';           // 0x20
       printf("%c:%s\n",c,isgraph(c)?"yes":"no");
       c=0x7f;
       printf("%c:%s\n",c,isgraph(c)?"yes":"no");
       
       getchar();
       return 0;
     }


isdigit
islower
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

alloi动态内存

stdio输入输出函数

stdlib基础库函数

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }