Question: Can I please get some assistance on this? 1. Write a program to test the correctness of a password according to some rules. If the

 Can I please get some assistance on this? 1. Write a

Can I please get some assistance on this?

1. Write a program to test the correctness of a password according to some rules. If the password is not valid, print messages showing what's wrong with the password. Partial program output should look like this: Please enter a password. It must be at least 8 characters long and contain at least 2 alpha characters, at least one upper case and one lower case, at least 1 numbers, and at least 1 special character such as #, @ or $. Note that blank spaces are not permitted. Enter password: !# abcd Invalid password: >>> At least 8 characters >>> At least one upper case >>> At least one number >>> Blank spaces are not permitted Try again? Y Enter password: aBcd!2E4 Password accepted! Try again? n Goodbye and Happy Programming! 2. Write a function my_strcpy(char str1[], char str2[], int str2_size, int p1, int p2) which copies the C-string in str1 (from index p1 to index p2) to str2 (size is str2_size). Your function has to check if str2 has enough space. If there is no enough space in str2 to accommodate the string, print an error message but not copy anything to str2. Also write a driver program to test your function. Sample program output: str1 = I love C++ so much! str1 = I love C++ so much! Copy from str1 to str2 ... Copy from str1 to str2 ... Start position: 3 Start position: 3 End position: 13 End position: 10 >> Error str2 = love C++ >> str2 does not have enough space. Try again? (y) n >> Copy failed. Try again? (y) y Have a nice day

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!