I know this challenge was issued a year ago, but here is my solution (built with the help of some of the other solutions in this forum and elsewhere on the web):

I am very new to C (and programming for that matter), but it seems to work ok.

The code below didn't render correctly so the actual code can be found here: https://github.com/Seven7au/C_Programming/blob/master/password_checker


#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <math.h>

int main()
{
char answer2;
answer2='y';

while(answer2=='y')
{
int i;
char password[11];
int upperCase = 0, special = 0, number = 0, pass_len = 0;
int length;
printf("Enter a password (include at least one: uppercase, number, special character) no more than 10 characters & no less than 8 Characters in length.\n");
scanf(" %s",&password);

for(i=0;i<10;i++)
{
if(isupper(password)){
upperCase = 1;
}
if(isdigit(password)){
number = 1;
}
if(ispunct(password)){
special = 1;
}
length = strlen(password);
}
if ((length>7) && (length<11)){
pass_len = 1;
}
if(upperCase == 1 && special == 1 && number == 1 && pass_len == 1){
printf("You have entered a good password.\n");
printf("\nDo you wish to try again? y/n \n\n");
scanf(" %c",&answer2);
}else{
printf("Your password does not comply, please try again.\n");
printf("\nDo you wish to try again? y/n \n\n");
scanf(" %c",&answer2);
}
}
return 0;
}