finish this for me, cpp int countValidWords(char* s) { char* buffer = malloc(strlen(s) *…
Private research annotation
Sign in to add a private research label or note.
- User
finish this for me, cpp
int countValidWords(char* s) { char* buffer = malloc(strlen(s) * sizeof(char)); printf("%d %d", strlen(s), strlen(buffer)); for(int i = 0; i < strlen(s); i++) { // Go until we find ' ' if(s[i] == ' ') { // Evaluate // At least 3 chars // Contains a vowel and a consonant bool containsVowelAndConsonant = false;; for(int j = 0; j < buffer; j++) {
code} } } // bonus points free(buffer); return 0;}
- Assistant