C
c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
const int TRUE = 1;
const int FALSE = 0;
const int MAX_SIZE = 20;
int is_valid_length(char arr[]);
int has_char_from_test(char test[], char source[]);
int has_space(char arr[]);
int main()
{
char special_char[] = "%/\\*@$!#:;&_";
char nums[] = "0123456789";
char password[MAX_SIZE];
fgets(password,MAX_SIZE, stdin);
if(!(is_valid_length(password)))
{
printf("Invalid password: length must be between 5 and 10 characters");
exit(0);
}
if(!(has_char_from_test(special_char, password)))
{
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run