I was just writing some more for my program and I tried to to this:
But even if I type Y , it does what is in the if statement's brackets. So how do you compare characters correctly?Code:printf("Are you sure you want to clear the database? (Y or N) "); fgets(buff,sizeof(buff),stdin); sscanf(buff,"%c", &ques); if((ques !='y)' || (ques !='Y'))