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 function bool checkPassword(const char password[], int size) where password is a password that must be validated, and size is the length of the password string. The function must return true if the password is valid according to the rules described above and false if it is not valid.
Note: In addition to the checkPassword function, you must also write any #include directives for header files needed by your code.