Login functionality in C-language :

Here the user enters the user id and password.

The entered user id and password will be compared with the stored ones and user will be authenticated.

While user enters password, characters should not be displayed on the screen.

user id comparison must be case insensitive and password must be case sensitive.

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
main()
{
int i,counter=0,flag=0;
char uid[25],pwd[25],s_uid[][25]={"11user1","12user2","13user3"};
char s_pwd[][25]={"Pwd1","Pwd2","Pwd3"},ch='a';/*dummy character in ch */
 clrscr();
printf("\n Enter the user id : ");
scanf("%s",uid);

printf("\n Enter the password : ");
i=0;
while(1)
{
	ch=getch();
	if(ch==13)
	break;
	else if(ch==8)
	{       if(i!=0) /*this is for avoiding the ENTER instructions getting deleted */
		{
			printf("\b");  /*printing backspace to move cursor 1 pos back*/
			printf("%c",32);/*making the char invisible which is already on console*/
			printf("\b"); /*printing backspace to move cursor 1 pos back*/
			i--;
			pwd[i]='\0';
		}
		else
		continue;

	}
	else
	{
	putchar('*');/* char - '*' will be printed instead of the character */
	pwd[i]=ch;
	i++;
	}
}
pwd[i]='\0';


for(i=0;i<=2;i++)
{
	if((stricmp(uid,s_uid[i]))==0 && (strcmp(pwd,s_pwd[i]))==0)
	{
		flag=1;
		break;
	}
}
if(flag) printf(" \n \n \t \t USER AUTHENTICATED ");
else printf("\n \n \n\t TRESSPASSERS WILL BE SHOT AND SURVIVORS WILL BE SHOT AGAIN .. ha ha :)");
printf(" \n \n \tThanks for testing.. written by dileep basam :) ");
getch();
}

your code is very good .
but if u provide one screenshot. it will be excellent
any way thank you

i can't get. what is the id and pass.

They are on line 8 and 9:

char uid[25],pwd[25],s_uid[][25]={"11user1","12user2","13user3"};
char s_pwd[][25]={"Pwd1","Pwd2","Pwd3"},ch='a';/*dummy character in ch */
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
main()
{
int i,counter=0,flag=0;
char uid[25],pwd[25],s_uid[][25]={"11user1","12user2","13user3"};
char s_pwd[][25]={"Pwd1","Pwd2","Pwd3"},ch='a';/*dummy character in ch */
 clrscr();
printf("\n Enter the user id : ");
scanf("%s",uid);
printf("\n Enter the password : ");
i=0;
while(1)
{
    ch=getch();
    if(ch==13)
    break;
    else if(ch==8)
    {       if(i!=0) /*this is for avoiding the ENTER instructions getting deleted */
        {
            printf("\b");  /*printing backspace to move cursor 1 pos back*/
            printf("%c",32);/*making the char invisible which is already on console*/
            printf("\b"); /*printing backspace to move cursor 1 pos back*/
            i--;
            pwd[i]='\0';
        }
        else
        continue;
    }
    else
    {
    putchar('*');/* char - '*' will be printed instead of the character */
    pwd[i]=ch;
    i++;
    }
}
pwd[i]='\0';
for(i=0;i<=2;i++)
{
    if((stricmp(uid,s_uid[i]))==0 && (strcmp(pwd,s_pwd[i]))==0)
    {
        flag=1;
        break;
    }
}
if(flag) printf(" \n \n \t \t USER AUTHENTICATED ");
else printf("\n \n \n\t TRESSPASSERS WILL BE SHOT AND SURVIVORS WILL BE SHOT AGAIN .. ha ha :)");
printf(" \n \n \tThanks for testing.. written by dileep basam :) ");
getch();
}