hi..i am trying to write a small password program..this is the code i have written...
Code:
#include<stdio.h>
#include<conio.h>
int main()
{
clrscr();
int count,pass[5];
printf("Enter password..\n");
count = 0;
while(count < 5)
{
pass[count] = getch();
count = count + 1;
printf("*");
}
return 0;
}
The following is my problem..
1.when i press "RETURN" key or "BACKSPACE" key.. the character "*" is being displayed..
2.rather when "BACKSPACE" key is pressed i want the previously printed stars to be deleted.. and when "RETURN" key is pressed i want to compare the entered password with the actual password..
Can somebody please Guide me..
Thanking you,
V.Narendra