I created this code in C to generate masks in the password, but it does not let you delete the characters afterwards nor save the variable correctly. What can it be?
Follow the current code:
void login(){
int i,tam;
char usuario[80], senha[80];
printf("Digite o usuario. -> ");
scanf("%s", usuario);
printf("Digite a senha. -> ");
fflush(stdin);
for (i=0; i<10; i++)
{
senha[i] = getch();
putchar('*');
}
printf("\n");
senha[i]='void login(){
int i,tam;
char usuario[80], senha[80];
printf("Digite o usuario. -> ");
scanf("%s", usuario);
printf("Digite a senha. -> ");
fflush(stdin);
for (i=0; i<10; i++)
{
senha[i] = getch();
putchar('*');
}
printf("\n");
senha[i]='%pre%';
scanf("%s", senha); }
';
scanf("%s", senha); }