Question: C Language Define the function given below: /*This function takes a list of names (the parameter all_people), a string (no_name) and an integer (size). It
C Language
Define the function given below:
/*This function takes a list of names (the parameter all_people), a string (no_name) and an integer (size). It first prompts the user to enter a name (1 point). It then checks if any of the names in the first parameter match either the second parameter or the name entered by the user(7 points). If a name in the list does match the second
parameter or the name entered by the user, the phrase The name ____is not allowed (with the name that matched-see sample run(7 points)). It returns the number of times names that were not allowed occurred
*/ int check_names(char ** all_people, char *no_name, int size);
Sample run w/ this line of code: int n=check_names(names,"mike",5); /* n==2 in this sample run*/ Enter another person's name to check: pete The name mike is not allowed. The name pete is not allowed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
