Question: Write a logical statement comparing char variables. Assignment: You are developing a feature for a user authentication system that validates the strength of a user's
Write a logical statement comparing char variables.
Assignment: You are developing a feature for a user authentication system that validates the strength of a user's password. As part of this system, you need to check that the passwords do not match forbidden passwords that are very weak.
Assume lcPassword to be a string variable that has been declared and already given a value, representing the user's password, but entirely lowercase. Write an expression whose value is true if lcPassword is one of the forbidden passwords:
"password"
"admin"
Store the resulting value in a bool variable named isForbidden, which you also need to declare.
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
