Question: Create a C program to validate a password entered by a user. The programs test that it meets certain criteria to be considered a valid
Create a C program to validate a password entered by a user. The programs test that it meets certain criteria to be considered a valid password.
Program Requirements
The program should prompt the user to enter a potential password.
The password must be at least characters long with no spaces or tabs
Those characters must include uppercase character, lowercase character, number, and punctuation special character.
Input Requirements
The password will be stored in a character array. string
The input should be limited to characters.
Output Requirements
All output should send to standard output.
The output should be descriptive.
Sample Output User Input Is Bold
Please enter your password to test!
Enter a string max length : zTeht$n
This is a valid password.
Please enter your password to test!
Enter a string max length : zteht$
Invalid password!
Must have at least characters.
Must have at least uppercase character.
Please enter your password to test!
Enter a string max length : zTehtn
Invalid password!
Must have at least number.
Must have at least special character.
Please enter your password to test!
Enter a string max length : zT t$n
Invalid password!
No spaces allowed!
Please enter your password to test!
Enter a string max length : zTfeedst$nsleep!!
Password entered is too long!
Additional Instructions
Implement error handling for invalid inputs. String is too long.
Include comments to explain the purpose of each part of your code.
Test the program with various valid and invalid values.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
