int isblank(int ch) : isblank « ctype.h « C / ANSI-C






int isblank(int ch)




//Declaration:  int isblank(int ch); 
//Return:       returns nonzero if ch is blank. 
                By default, the blank characters are space and horizontal tab. 
  #include <ctype.h>
  #include <stdio.h>

  int main(void)
  {
    char ch;

    for(;;) {
       ch = getchar();
       if(ch == '.') {
          break;
       }
       if(isblank(ch)){
           printf("%c is a word separator\n", ch);
       }
    }

    return 0;
  }

         
/*
q
q is a letter
w
w is a letter
q
q is a letter
.
*/
           
       








Related examples in the same category