this is the key to your problem! if strcmp is "at least once" equal to zero then the name is in the array. That at least once implies that if any iteration of the for loop strcmp is zero you must change some value that after the for loop indicates that one or more names in the array is equal to the name you were searching for