hey..i am a novice when it comes to C programming coz i am a bio-engineer..however, i landed a job with an It giant, and we have been allotted a project(for practice's sake though!) by them on a trainee level..ofcourse, it involves a normal-login program..i was able to figure out most of the code however i got stuck with teh bit of displaying a "*" instead of the the actual passwords(typical of most login sites)..
could someone please help me out with this..
il still produce the rest of the code which requires us to make a character sensitive comparison in case of teh password..please feel free to correct me but do offer explanations..
thanx in advance
code-->
void
fnlogincheck();
main(int argc,char**argv)
{
system("cls");
fnlogincheck();
return 0;
}
void
fnlogincheck();
{
char *pcloginid[3]={"user1","user2","user3"};
char *pcpwd[3]={"Potato","Tomato","Turnip"};
int l,p,i,c;
char login[5];
char password[6];
printf("\n\n\n\n\t\tEmployee Information System\n");
printf("\t\t===========================\n\n");
printf("\t\tLogin Screen\n");
printf("\t\t============\n");
printf("\n\t\tEnter User Id\t: ");
scanf("%c",&login);
printf("\n\t\tEnter Password\t: ");
scanf("%c",&password);
{
l=strcmp(&loginid, login);
p=!strcmp(&pwd,password);
for(i=o,i<=3,i++)
}
{
password[c]= password[6]
printf("*");
for(c=0,c<=6,c++)
}
{
if l=0,p=0
printf("LOGIN ACCEPTED");
else printf("LOGIN DENIED");
exit
}