Sunday, 15 September 2013

PASSWORD PROGRAM IN C


#include<stdio.h>
#include<conio.h>
#include<string.h>


int main()
{
    char username[25],password[12];
    int i=0;

    printf("enter your username:");
    gets(username);

    printf("\n\nenter password:");

    while((password[i]=getch())!='\r')
    {
        printf("%c",'*');
        i++;
    }
password[i+1]='\0';



    printf("\n\n<<<<<<<<<<................>>>>>>>>>>>>>....................");
    printf("\nusername=%s",username);
    printf("\npassword=%s",password);
    getch();
    return 0;
}

No comments:

Post a Comment