Question: Need in C + + Goal: Learning how to validate input. Assignment: You are building a new social media platform, and you want to make
Need in C
Goal: Learning how to validate input.
Assignment: You are building a new social media platform, and you want to make sure your users follow best practices when choosing their password.
You've set the following requirements for a valid password:
A password must contain at least one lowercase letter.
A password must contain at least one uppercase letter.
A password must contain at least one digit.
A password must contain at least one punctuation character.
A password must not contain whitespace.
Write a functionbool checkPasswordconst char password int sizewherepasswordis a password that must be validated, andsizeis the length of the password string. The function must returntrueif the password is valid according to the rules described above andfalseif it is not valid.
Note: In addition to thecheckPasswordfunction you must also write any#includedirectives for header files needed by your code.
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
