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 <string.h>
#include <ctype.h>
// Function to check if a character is a special character
int isSpecialChar(char ch) {
switch(ch) {
case '!': case '@': case '#': case '$': case '%': case '&': case '*':
return 1;
default:
return 0;
}
}
// Function to evaluate password strength
void evaluatePassword(char *password) {
int len = strlen(password);
int digit_count = 0;
int special_count = 0;
// Check length
if (len < 7) {
printf("Weak\n");
return;
}
// Check for digits and special characters
for (int i = 0; i < len; i++) {
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run