You're not zero-terminating the strings you're building; atoi()
may be reading past the ends of the arrays.
// x will be uninitialized, not necessarily zero-filled
char x[MAXTIME];
while ((n=getchar()) != '\n'){
x[m] = n;
m++;
}
x[m] = '\0'; // make it a valid C string
*score = atoi(x);
All of this assumes that we don't get more than MAXTIME
characters.
To avoid that problem:
while ((m < (MAXTIME - 1)) && ((n=getchar()) != '\n')){