Hi,
I was working on a program which count #'s of upper and lower case letters, digits and # of all special characters in a sentence a user enters. So, here is what I got so far:
#include <stdio.h>
#include <ctype.h>
#include <string.h>

int main()
{
char str[30];
int len;
int i;

printf("\nEnter a sentence:");
gets(str);
len = strlen(str);

for (i=0; i<len;i++){
if (isalpha(str[i])){
printf("\nstr[%d] is alpha", i);
if (islower(str[i]))
printf("\nstr[%d] is lowecase",i);
else
printf("\nstr[%d] is upper", i);
}
if (isdigit(str[i])){
printf("\nstr[%d] is Digit", i);
}
else
printf("\nstr [%d] is Not alpha nor digit");
}
return 0;
}

Thanks