As some of you would already know, I made a program which accepts login and password from users and shows "*" instead of actual password characters.
I know the program is grossly incorrect but I still tried to apply whatever I picked up using books and example programs.
*****DISCLAIMER- I am not an IT wizkid and calling me a beginner would be an extrapolated statement aswell. I am here to learn and discuss and not to be admonished at***************
.
.
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<ctype.h>
#include<math.h>
void
fnlogincheck();
int 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("%s",&login);
printf("\n\t\tEnter Password\t: ");
scanf("%s",&password);
}
{
l=strcmp(&loginid[i], login);
p=!strcmp(&pwd[i],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
}
.
.