Code:
void addNewEnrolment() {

printf("\n       Student Number: ");
	scanf("%s", NEW_ENR_STUDENT_NUMBER);
	strcpy(edatabase[enrolment_record_count].ENR_STUDENT_NUMBER, NEW_ENR_STUDENT_NUMBER);
	edatabase[enrolment_record_count].ENR_STUDENT_NUMBER[9] = '\0';
}

void addToEnrolmentDatabaseArray(char line[]){

strncpy(edatabase[enrolment_record_count].ENR_STUDENT_NUMBER, data_pointer, 9);
	edatabase[enrolment_record_count].ENR_STUDENT_NUMBER[9] = '\0';

}
This is a part of my C program, there is a function to add new enrolment, and another funtion to add record to the array. The variable is declared like this:

char ENR_STUDENT_NUMBER[10];

The problem I am having is that, when the user input number, let say: 120 , it is less than the array size, when i call functions to modify or delete the record using ENR_STUDENT_NUMBER, it says Record not Found, but the record is succesfully added in a text file. Another problem is that, with the same workings like above but different variable:

char ENR_COURSE_DESCRIPTION[26];

When the program asks for user input, whenever the user enter space between input, the program skips 2 other inputs and goes for the next. Can anyone help me solve this problem?