#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
int main(void)
{
    unsigned int c;
    char is_punct[128] = {0,}; unsigned i = 0;
    char is_digit[128] = {0,}; unsigned j = 0;
    char is_lower[128] = {0,}; unsigned k = 0;
    char is_upper[128] = {0,}; unsigned l = 0;
    char is_alpha[128] = {0,}; unsigned m = 0;
    char is_alnum[128] = {0,}; unsigned n = 0;
    unsigned flag = 0;
  
    for(c = 0; c < 128; ++c)
    {
         if(ispunct(c))
         {
            is_punct[i] = c;
            i++;
         }
         if(isdigit(c))
         {
            is_digit[j] = c;
            j++;
         }
         if(islower(c))
         {
            is_lower[k] = c;
            k++;
         }
         if(isupper(c))
         {
            is_upper[l] = c;
            l++;
         }
         if(isalpha(c))
         {
            is_alpha[m] = c;
            m++;
         }
         if(isalnum(c))
         {
            is_alnum[n] = c;
            n++;
         }                         
        
    }
    printf("%10s","ispunct: ");
    for(flag = 0; flag < i; flag++)
    {
       printf("%c", is_punct[flag]);
    }
    printf("\n%10s","is_digit: ");
    for(flag = 0; flag < j; flag++)
    {
       printf("%c", is_digit[flag]);
    }
    printf("\n%10s", "is_lower: ");
    for(flag = 0; flag < k; flag++)
    {
       printf("%c", is_lower[flag]);
    }
    printf("\n%10s", "is_upper: ");
    for(flag = 0; flag < l; flag++)
    {
       printf("%c", is_upper[flag]);
    }
    printf("\n%10s","is_alpha: ");
    for(flag = 0; flag < m; flag++)
    {
       printf("%c", is_alpha[flag]);
    }
    printf("\n%10s", "is_alnum: ");
    for(flag = 0; flag < n; flag++)
    {
       printf("%c", is_alnum[flag]);
    }
    putchar('\n');           
    system("pause");
    return 0;
}