C 库函数 - isprint() C 标准库 - <ctype.h> 描述 C 库函数 int isprint(int c) 检查所传的字符是否是可打印的。可打印字符是非控制字符的字符。 声明 下面是 isprint() 函数的声明。 int isprint(int c); 参数 c -- 这是要检查的字符。 返回值 如果 c 是一个
C 库函数 – isprint() C 库函数 – isspace() C 库函数 - ispunct() C 标准库 - <ctype.h>描述C 库函数 int ispunct(int c) 检查所传的字符是否是标点符号字符。标点符号字符可以是非字母数字(正如 isalnum 中的一样)的任意图形字符(正如 isgraph 中的一样)。声明...
函数名: isprint 头文件:<ctype.h> 函数原型: int isprint(int ch); 功能: 判断字符是否为可打印字符(含空格) 参数: int ch 待检查的字符 返回值: ch不是可打印字符 返回0 , ch是可打印字符(含空格) 返回非0 程序例: 判断输入的字符是否为可打印字符(含空格) 1 2 3 4 5 6 7 8 9 10 11 12 ...
代码语言:javascript 代码运行次数:0 运行 AI代码解释 intisprint(int c); 综上可知,当你向isprint()函数传输一个字符(实际是它的ASCII值)时,它会判断其是否是可打印字符,包括字母、数字、标点符号等,如果是,它会返回给你一个非零的数,如果不是,则会返回0。 可打印字符包括下表中的所有字符,即从 ' '(空...
#include <stdio.h> #include <ctype.h> #include <locale.h> int main(void) { unsigned char c = '\xa0'; // ISO-8859-1 的无中断空格 printf("In the default C locale, \\xa0 is %sprintable\n", isprint(c)?"":"not "); setlocale(LC_ALL, "en_GB.iso88591"); printf("In ISO-...
下面是 isprint() 函数的声明。 intisprint(intc); 参数 c-- 这是要检查的字符。 返回值 如果c 是一个可打印的字符,则该函数返回非零值(true),否则返回 0(false)。 实例 下面的实例演示了 isprint() 函数的用法。 #include<stdio.h>#include<ctype.h>intmain(){intvar1='k';intvar2='8';intvar3...
isprint()函数⽤于判断字符是否为可打印字符(含空格)。语法 int isprint(int ch);isprint()函数的语法参数说明如下:参数ch为⼀个待检查的字符。isprint()函数的返回值:不是可打印字符返回0,是则返回⾮0.⽰例 本⽰例演⽰⽤isprint()函数判断输⼊的字符是否为可打印字符(含空格)。其具体代码如下...
isprint(测试字符是(否为可打印字符) 相关函数 isgraph 表头文件#include<ctype.h> 定义函数int isprint(int c); 函数说明 检查参数c是否为可打印字符,若c所对映的ASCII码可打印,其中包含空格字符,则返回TRUE。 返回值 若参数c为可打印字符,则返回TRUE,否则返回NULL(0)。
Example: C isprint() function #include<ctype.h>#include<stdio.h>intmain(){charc; c ='Q';printf("Result when a printable character %c is passed to isprint(): %d", c,isprint(c)); c ='\n';printf("\nResult when a control character %c is passed to isprint(): %d", c,isprint(...
相关函数 isgraph 头文件 #include <ctype.h> 定义函数 int isprint(int c); 函数说明检查参数 c 是否为可打印字符, 若c 所对应的ASCII 码可打印, 其中包含空格字符, 则返回TRUE. 返回值若参数c 为可打印字符, 则返回TRUE, 否则返回NULL(0). 附加说明此为宏定义, 非真正函数. ...