This little program will gather all entered characters and determine how many numeric characters there are, alpha characters and special punctuation chars, including spaces!
/* Programmer: Boris Kuzmanov alias A^1^T^E^A^M (Gravedigger) */
#include <stdio.h>
#include <ctype.h>
int main()
{
char ch;
int num_ch, num_num, spec_num;
num_ch = 0;
num_num = 0;
spec_num = 0;
printf("Print characters: ");
while((ch = getchar()) != '\n')
{
if(isalpha(ch))
num_ch++;
else if(isdigit(ch))
num_num++;
else if(ispunct(ch))
spec_num++;
else if(isspace(ch))
spec_num++;
}
printf("\nThere are %d letters in the string!", num_ch);
printf("\nThere are %d numbers in the string!", num_num);
printf("\nThere are %d special characters in the string!\n", spec_num);
system("Pause");
return 0;
}