I have spent so many hours trying to make this work and I just can't seem to get it right.
This is the part that I am having trouble with: Write a void function called display() to display each element of the struct at the end of the program, call display and pass it the array of structs.
Write a void function called display() to display each element of the struct at the end of the program, call display and pass it the array of structs.
void display(Leads x, Leads names);
In the above snippet you are passing two single Leads, not an array of Leads. You really should be passing an array, along with the number of elements in that array.
void dispaly(Leads names[], size_t num_elements);
You'll need to change the implementation and the function call to reflect this change.
If you're talking about your display() function, where did you declare a variable named x?
That function is using an array of Leads called names. This is the variable you will use. You need to restructure the program to take the changes you made to the function signature into account.