Question: C++ Write a program that uses c-strings to check whether a password that a user enters is a valid password, with the following rules. Password
C++
Write a program that uses c-strings to check whether a password that a user enters is a valid password, with the following rules.
Password rules:
The password must be at least 8 characters long.
The password must contain at least:
two alphabetic characters [a-zA-Z]
one numeric character [0-9];
one special character from this set: $ # ? *
The password must not contain spaces.
The password must not begin with a dollar sign [$] or an asterisk [*].
The first 2 characters of the password must not be the same character.
Write a program that asks the user for a password and then verifies that it meets the stated criteria. If it is a valid password, the program should display a message saying the password is valid. If it does not verify, the program should display a message telling the user why the password is invalid. Delegate different tasks to different functions so your code is clear and easy to follow!
Remember you can use the built-in c-string functions so you don't have to recreate them in your code!
For example, this password is valid: pass1*co#234
While this password is invalid for several reasons: notgood1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
