I'm trying to make a password code that is supposed to ask the user for a password and then ask the user to re-enter this password to confirm. The program is supposed to compare the two strings and if all the characters match then proceed but mine does not seem to work... any suggestions?
#include <stdio.h>
#include <string.h>
int main()
{
/*variables*/
char administration_password[255]="";
char administration_validation[255]="";
/*end of variables*/
printf("\n");
printf (" *******************************************\n");
printf (" Data Management Software\n");
printf (" *******************************************\n\n");
printf ("*****\n");
printf ("SETUP\n");
printf ("*****\n");
printf ("\n");
printf ("\n");
printf("At least one administrator is required to use this sorftware.\n\n");
printf("Please set the administration password: ");
scanf ("%s", administration_password);
printf ("\n");
printf("Re-enter the password to confirm: ");
scanf ("%s", administration_validation);
printf ("\n\n");
while (administration_password != administration_validation)
{
printf ("\n");
printf ("The two passwords to not match please try again.\n");
printf ("\n");
printf ("Please set the administration password: ");
scanf ("%s", administration_password);
printf ("\n");
printf ("Re-enter the password to confirm: ");
scanf ("%s", administration_validation);
printf ("\n\n");
}
printf ("\n");
printf ("\n");
printf ("**************************************\n");
printf ("The Password has successfully been set\n");
printf ("**************************************\n");
printf ("\n");
printf ("\n");
}