write a C program that read data from file data.in and store in an array.
a) find the name entered from keyboard. If no match then return "Not found"
b) list all names that are not duplicate in array
data.in file content:
5
Bill Gates
Steve Jobs
Daniel Rhode
Billy Carpenter
Steve Jobs
when i typed in the name, the output was always not found even when matched. What is the problem here??
fgets, which leaves the newline at the end of the string. But you read the name to search for withgets, which does not leave the newline. One fix is to usefgetsto read the name to search for.