Lab 1 Exercise 2

Lab 1 Exercise 2

You cannot submit for this problem because the homework's deadline is due.

Ex2. Validating Password

Related Topics: loops, arrays, boolean, ASCII.

Jin builds his website and wants to develop the back-end of the sign-up page for jAccount. In one of his programs, he has to write a function that checks if the password user submitted to the webserver is valid:

  • Contains at least 1 alphabetic characters;
  • Contains at least 1 numerical characters;
  • Contains at least 1 non-alphanumeric characters.

The function takes a password (an array of chars) as input, returns true if the password is valid and returns false if not.

bool isValidPassword(char password[]){
    // TODO: Implement this function.
}

You are told that no password contains more than 50 characters. Please help him implement the function.

Example

Example input:

I-love-VE280

Example output:

1

Limits

1s, 128MiB

Lab 1

Not Claimed
Status
Finished
Problems
3
Open Since
2023-05-12 18:00
DDL
2023-05-18 23:59
Extension
72.0 hour(s)