So I'm writing a program for a Practice Lab Final and my professor gave us four test cases. Two out of the four test cases work perfectly with my program. The last two test cases however give me differences between his output and my output. Here's the code for my program so far.

Code:
#include <stdio.h>
#include <string.h>
#include <strings.h>

int splitStrings( char fName[20], char lName[20], int age )
{
  scanf( " %s %s %d", fName,lName,&age );

  return age;
}

int search( char names[21][20], int ages[21], char value[20], int *totAges )
{
  char tempArr[20];
  int rCtr = 0;
  int ctr = 0;
  int ageCtr = 0;

  for( rCtr = 0; rCtr < 20; rCtr++ ) {
    strcpy( tempArr, names[rCtr] );
    if( !strcasecmp( tempArr, value ) ) {
      ctr++;
      ageCtr += ages[rCtr];
    }
  }
  *totAges = ageCtr;

  return ctr;
}

int main( void )
{
  char firstName[21][20];
  char lastName[21][20];
  int age[21];
  char first[20];
  char last[20];
  char fValue[20];
  char lValue[20];
  int tempAge = 0;
  int tAge = 0;
  int fTotalAge = 0;
  int lTotalAge = 0;
  int people = 0;
  int rCtr = 0;
  int cCtr = 0;
  int fNameCtr = 0;
  int lNameCtr = 0;

  for( rCtr = 0; rCtr < 20; rCtr++,people++ ) {
    tempAge = splitStrings( first, last, tempAge );
    tAge += tempAge;

    for( cCtr = 0; cCtr < 3; cCtr++ ) {
      if( cCtr == 0 ) {
        strcpy( firstName[rCtr], first );
      }
      if( cCtr == 1 ) {
        strcpy( lastName[rCtr], last );
      }
      if( cCtr == 2 ) {
        age[rCtr] = tempAge;
      }
    }

    if( !strcmp(firstName[rCtr], "DONE") && !strcmp(lastName[rCtr], "DONE") &&
        age[rCtr] == 0 ) {
      break;
    }
  }

  scanf( " %s", fValue );
  scanf( " %s", lValue );

  fNameCtr = search( firstName, age, fValue, &fTotalAge );
  lNameCtr = search( lastName, age, lValue, &lTotalAge );

  printf( "%d people.  Total age is %d.\n", people, tAge );
  printf( "%d people with first name %s.  Total age is %d.\n",
          fNameCtr, fValue, fTotalAge );
  printf( "%d people with last name %s.  Total age is %d.\n",
          lNameCtr, lValue, lTotalAge );

  return 0;
}
It seems like for the last two test cases, my program never even reaches the last two scanf()'s in main, which ask for the search value. Any ideas? Thanks