#include #include struct initials { char first_initial; char last_initial; }; // Return the total number of structs that don't // have both initials set to capital letters int struct_capitals(int size, struct initials array[size]) { int total = 0; for (int i = 0; i < size; i++) { if (array[i].first_initial < 'A' || array[i].first_initial > 'Z' || array[i].last_initial < 'A' || array[i].last_initial > 'Z'){ total++; } } return total; } // This is a simple main function which could be used // to test your struct_capitals function. // It will not be marked. // Only your struct_capitals function will be marked. #define TEST_ARRAY_SIZE 5 int main(void) { struct initials test_array[TEST_ARRAY_SIZE] = { { .first_initial = 'A', .last_initial = 'F'}, { .first_initial = '!', .last_initial = 'Z'}, { .first_initial = 'Z', .last_initial = 'X'}, { .first_initial = 'n', .last_initial = 'S'}, { .first_initial = 't', .last_initial = 'a'} }; printf("%d\n", struct_capitals(TEST_ARRAY_SIZE, test_array)); return 0; }