Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

isprint - Test for printable character including space

&pagelevel(4)&pagelevel

Definition

#include <ctype.h>

int isprint(int c);

isprint checks whether the character c is a printable character, i.e. an alphanumeric
character, a special character, or a space.

Return val.

!= 0

0

c is printable (including space).

c is non-printable.

Example

#include <ctype.h>
#include <stdio.h>
int main(void)
{
  int c;
  while((c = getchar()) != EOF)
    printf("%s : %c\n",((isprint(c))? "Character" : "Cannot print"), c);
  return 0;
} 

See also

isalnum, isascii, iscntrl, isdigit, isgraph, islower, isalpha, ispunct, isspace, isupper, isxdigit,
isebcdic, iswprint