Create a program in C Language that checks if a password and the repeated confirmation password match according to the following criteria: The password must be at least 8 characters long. The password and confirmed password must match. The password must include at least 1 lowercase character. The password must include at least 1 uppercase character. The password must include at least 1 number. The password must include 1 of the following special characters: ! @ # $ ? In your code, create a function which accepts two character arrays representing the password and repeated password. If the password entered does not meet the requirements listed above, the function should return 1. If the password meets all the requirements, return 0. In main, print a statement indicating the result after the password checking function is called. Save your code as password_check.c Other Requirements Your code must use consistent formatting and spacing. Points will be taken off for inconsistent or sloppy code. Make sure you remove the trailing newline if reading the string using `fgets()`. Example Runs **** Success Enter a password: turkeY1! Enter the password again: turkeY1! Password accepted. **** Failure Enter a password: turkeY11 Enter the password again: turkeY11 Invalid password.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.2: Returning A Single Value
Problem 13E
icon
Related questions
Question

Create a program in C Language that checks if a password and the repeated confirmation password match according to the following criteria:

  • The password must be at least 8 characters long.
  • The password and confirmed password must match.
  • The password must include at least 1 lowercase character.
  • The password must include at least 1 uppercase character.
  • The password must include at least 1 number.
  • The password must include 1 of the following special characters: ! @ # $ ?

In your code, create a function which accepts two character arrays representing the password and repeated password. If the password entered does not meet the requirements listed above, the function should return 1. If the password meets all the requirements, return 0. In main, print a statement indicating the result after the password checking function is called.

Save your code as password_check.c

Other Requirements

  • Your code must use consistent formatting and spacing. Points will be taken off for inconsistent or sloppy code.
  • Make sure you remove the trailing newline if reading the string using `fgets()`.

Example Runs

**** Success
Enter a password: turkeY1!
Enter the password again: turkeY1!
Password accepted.

**** Failure
Enter a password: turkeY11
Enter the password again: turkeY11
Invalid password.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr