Hello everybody,
Is there a way to write a delay function that can delay what i want to display?
And Can somebody teach me how to enable this password program that if i key in the wrong input i can backspace!!
//----------------------------------------------------------------------------------
#include <stdio.h>
#include <conio.h>
#include <ctype.h>
#define pwd_size 10
int main()
{
int ch;
char pword[pwd_size];
int i = 0;
printf("Enter your password:");
while ((ch = getch()) != EOF
&& ch != '\n'
&& ch != '\r'
&& i < sizeof(pword) - 1)
{
if (isalnum(ch))
{
putchar('*');
pword[i++] = ch;
}
}
pword[i] = '\0';
printf ("\nYou entered >%s<", pword);
return 0;
}
Thank For Your help