Vérifier si un caractère donné est un espace ou une tabulation

Author:


Download

 
#include 
#include 
 
int main(void)
{
   int wc;
 
   for (wc=0; wc <= 128; wc++) {
      printf("%3d", wc);//Le code du caractère
      printf(" %5c ", wc);
	  //Cochoer les caractères considérés espace ou tabulation
      printf("%2s", iswblank(wc)  ? "X"  : "-");
 
      putchar('n');
   }
   return 0;
}