Strings and Structures/assign4.c
int validateData(const CourseInfo *courses, const size_t courseCount, CourseInfo courseInfo){
    
    if(linearSearch(courses, courseCount, COURSE_CODE_FLAG, courseInfo.courseCode) != NOT_FOUND) return FOUND;
    if(binarySearch(courses, courseCount, courseInfo.courseID) != NOT_FOUND) return FOUND;

    return NOT_FOUND;
}
/*
    validateData: checks for violations of unique constraints (courseID, courseCode)
    input: the array to be searched (courses), the size of array (courseCount), the struct to validate (courseInfo)
    output: the index if found, else -1
*/
checks for violations of unique constraints (courseID, courseCode)
input: the array to be searched (courses), the size of array (courseCount), the struct to validate (courseInfo)
output: the index if found, else -1
checks for violations of unique constraints ( courseID courseCode ) input : the array to be searched ( courses ) the size of array ( courseCount ) the struct to validate ( courseInfo ) output : the index if found else - 1
int validateData(const CourseInfo *courses, const size_t courseCount, CourseInfo courseInfo){
    if(linearSearch(courses, courseCount, COURSE_CODE_FLAG, courseInfo.courseCode) != NOT_FOUND) return FOUND;
    if(binarySearch(courses, courseCount, courseInfo.courseID) != NOT_FOUND) return FOUND;
    return NOT_FOUND;
}
int validateData ( const CourseInfo * courses , const size_t courseCount , CourseInfo courseInfo ) { if ( linearSearch ( courses , courseCount , COURSE_CODE_FLAG , courseInfo . courseCode ) != NOT_FOUND ) return FOUND ; if ( binarySearch ( courses , courseCount , courseInfo . courseID ) != NOT_FOUND ) return FOUND ; return NOT_FOUND ; }
validateData: checks for violations of unique constraints (courseID, courseCode)
input: the array to be searched (courses), the size of array (courseCount), the struct to validate (courseInfo)
output: the index if found, else -1
validateData : checks for violations of unique constraints ( courseID courseCode ) input : the array to be searched ( courses ) the size of array ( courseCount ) the struct to validate ( courseInfo ) output : the index if found else - 1