Question: 3. Consider the function check password given below that takes two arguments: a user ID uid and candidate password pwd (both modeled as ints for


3. Consider the function check password given below that takes two arguments: a user ID uid and candidate password pwd (both modeled as ints for simplicity) This function checks that password against a list of user IDs and passwords stored in an array, returning 1 if the password matches and 0 otherwise 1 struct entryt int user; int pass; 4 5 typedef struct entry entry_t; 7 entry_t all1_pwds [1000]; 9 int check_password (int uid, int pwd) 10 int i = 0; int retval 0; 13 hile (i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
