Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1) (3 points) Write a C program checkPasswdLength.c to check if the length of a given password string is 10 characters or not. If not,
1) (3 points) Write a C program checkPasswdLength.c to check if the length of a given password string is 10 characters or not. If not, deduct 5 points per missing character. If the total deduction is greater than 30 points, print out the deduction and message "The password is unsafe! Please reset."; otherwise, print out "The password is safe." Hint: you do not need to use array. Please use getchar) to get user's input. Assume the password has no spaces in it. ] A sample of the output is like below Enter a password: ThisTest Score=-1 0 The password is unsafe! Please reset. 2) (3 points) Similar to above question, write a C program checkPasswdLetter.c to check if a password is safe or by not by checking only the evaluation criteria below. It will still print out the final score, and "safe" or "unsafe" when deduction is more than 30 points o Missing lower case o Lack of capital letters o Missing numbers -20 points -20 points -20 points 3) (4 points) Similar to above question, write a C program checkDupDeduct.c to check if a password containing more than 2 consecutive characters (e.g. 123 or abc). If yes, simply output the deduction as -20 4) (2 point) If the user stores a single password in a file "passwd.txt", how to use checkPasswdLength.c to check if the password in the file is safe or not using Unix command? 5) (Bonus: 4 point) If the user stores a list of passwords in a file "passwd.txt", and each row is for one password, then how to use checkPasswdLength.c to list the safety of each password from the file
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started