Is the first lower case 'a' a typo? The output doesn't really fit with the rest of the program as far as I can tell.Also are there any requirements as to how to sentence must be entered?

Anyways I made something that works if that is a typo. I did make this quickly. This code breaks some conventions and there are lots of ways to do this better to do this but I tried making it using more basic C/programming concepts so it's easier to focus on the logic and how I broke the problem down.

//The sentence must be entered through the command line parametersint main(int argc, char *argv[]){ //Check if the the user has entered command line parameters. if(argv[1] != NULL) { //String iterator. int i; //Flag to test if the first character has already been passed. int first_char_passed = 0;

//Check if the first character is upper case regardless it's a vowel. //If it is print it out and set the first_char_passed flag to 1 (true) //so that it no longer checks. if(isupper(argv[1][0]) && !first_char_passed) { printf("%c -upper case\n", current_char); first_char_passed = 1; } //Check if the current character is upper case and a vowel. else if(isupper(current_char) && isvowel(current_char)) { //Check if the the vowel count is greater than zero by subtracting //the 1 added by the vowel check and checking if it still isn't 0. if(isduplicate(current_char) - 1) printf("%c -upper case vowel duplicate\n", current_char); else printf("%c -upper case vowel\n", current_char); } //Check if the current character is lower case and a vowel. else if(islower(current_char) && isvowel(current_char)) { //Check if the the vowel count is greater than zero by subtracting //the 1 added by the vowel check and checking if it still isn't 0. if(isduplicate(current_char) - 1) printf("%c -lower case vowel duplicate\n", current_char); else printf("%c -lower case vowel\n", current_char); } //Check if the current character is a punctuation mark. else if(ispunct(current_char)) { printf("%c -punctuation\n", current_char); } //If all checks fail just print out the current character else { printf("%c\n", current_char); } } } } else { fprintf(stderr, "The sentence must be entered through command line parameters.\n"); return 1; } return 0;}

I recommend rewriting it because both it's badly made and if it's your assignment it's good to be honest; it'll benefit you in the long run.