int main(){
char password[10];
int i = 0;
printf("Please enter your password\n");
scanf("%s", password);
while (password != "juniorkid"){
printf("Error\n");
printf("Please enter your password\n");
scanf("%s", password);
i++;
if (i>1){
printf("Exceeded tries");
break;
}
else{
printf("yay\n");
}
}
}
clang-7 -pthread -lm -o main main.c main.c:20:19: warning: result of comparison against a string literal is unspecified (use strncmp instead) [-Wstring-compare] while (password != "juniorkid"){ ^ ~~~~~~~~~~ 1 warning generated. ./main