Using C(Not C++ or C#) I need help in coding this function. Implement a function int GetPassword(char *password) that will do the following in sequence: 1. Ask the user to input a string which will be...


Using C(Not C++ or C#) I need help in coding this function.


Implement a function int GetPassword(char *password) that will do the following in sequence:
1. Ask the user to input a string which will be stored into a local variable
named str (maximum of 20 characters).
2. Check if str is equivalent to password. If it is, the function returns a 1.
(Note: user entered the correct password.).
3. If they are not equivalent, i.e., the password is incorrect, repeat from step
1. The user is given three chances to enter the correct password. If after
three tries, the correct password was not supplied, the function will return
a value of 0.



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here