Ok here is what i have so far. I have made very minor changes to the code, just that now I broke up my sorting into different categories and I am counting how many characters are in each category instead of which category the character fits. I don't think those changes are too drastic.
I have also updated my code with anduril462 suggestion.
The instructions I am following specifically says to use getchar() only.
You could also use fgets to read in your string: fgets(str, sizeof(str), stdin); reads a whole line. It also null terminates your string and makes sure you don't overflow it
I am using Microsoft Visual C++ 2010 Express and the particular error I am receiving does not tell me which line it occurs on just a window that pops up after I enter in values for my sting.
int main (void)
int length, i = 0, count = 0, count_1 = 0,count_2 = 0, count_3 = 0, count_4 = 0, ch;
printf ("Input string values: ");
while ((ch = getchar()) != EOF && ch!= '\n' && i < sizeof(str))
str[i++] = ch;
length = strlen(str);
for (i = 0; i < length; i++)
printf ("%i characters are alphabetic\n", count);
printf ("%i characters are lowercase\n", count_1);
printf ("%i characters are uppercase\n", count_2);
printf ("%i characters are numeric\n", count_3);
printf ("%i characters are alphanumeric\n", count_4);
while (strlen(str) > 0);