It is in your power to create your own lookup table that serves your needs.
Below is a LUT for 7-bit ASCII characters, populated to indicate the nature of the 128 ASCII values commonly used.
And there is a short bit of code that uses the LUT to determine the nature of a character (alpha or no, vowel or no) entered by the user.
#include <stdio.h>
char tbl[] =
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
"Spppppppbbppppppddddddddddpppppp"
"pVCCCVCCCVCCCCCVCCCCCVCCCCCbpbpp"
"pvcccvcccvcccccvcccccvcccccbpbpp" ;
int main() {
int c = getchar();
int cX = tbl[ c ];
if( cX == 'C' || cX == 'V' )
printf( "%c is a capital letter\n", c );
else
if( cX == 'c' || cX == 'v' )
printf( "%c is a small letter\n", c );
else
printf( "%c is not a letter at all\n", c );
if( cX == 'V' || cX == 'v' )
printf( "%c is a vowel\n", c );
else
printf( "%c is not a vowel\n", c );
return 0;
}
There should be nothing difficult in the code above. The only difficulty is running the program over-and-over.
So, using 3 strings, we can exercise the table a little bit more.
#include <stdio.h>
char tbl[] = // the 'crafted' LUT
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
"Spppppppbbppppppddddddddddpppppp"
"pVCCCVCCCVCCCCCVCCCCCVCCCCCbpbpp"
"pvcccvcccvcccccvcccccvcccccbpbpp" ;
int main() {
char *smpl[] = { // 3 sample strings of characters
"ABCDEFGHIJKLM01234NOPQRSTUVWXYZ(,=$)",
"abcdefghijklm01234nopqrstuvwxyz[,=$]",
"Twas BRILLIG and the Slithey toves...\t",
};
const int nNum = sizeof smpl/sizeof smpl[0]; // how many?
for( int i = 0; i < nNum; i++ ) {
puts( smpl[i] ); // show the string
// now replace each character with its 'nature' (digit, vowel, etc.)
for( int r = 0; smpl[i][r]; r++ )
smpl[i][r] = tbl[ smpl[i][r] ];
puts( smpl[i] ); // show transformed string
puts( "" ); // blank line separator
}
printf(
"Legend:\n"
"\tX - control char\n"
"\tS - SP(ace)\n"
"\tp - punctuation\n"
"\tb - bracket/brace\n"
"\td - digit\n"
"\tC - consonant\n"
"\tV - vowel\n"
);
return 0;
}
And the output of the 2nd version looks like...
ABCDEFGHIJKLM01234NOPQRSTUVWXYZ(,=$)
VCCCVCCCVCCCCdddddCVCCCCCVCCCCCbpppb
abcdefghijklm01234nopqrstuvwxyz[,=$]
vcccvcccvccccdddddcvcccccvcccccbpppb
Twas BRILLIG and the Slithey toves...
CcvcSCCVCCVCSvccSSccvSCcvccvcScvcvcpppX
Legend:
X - control char
S - SP(ace)
p - punctuation
b - bracket/brace
d - digit
C - consonant
V - vowel