Secured password input using c programming language

#include<stdio.h>
#include<conio.h>
int main(){
    char password[100];

    printf("Password Must contain 5 Charaters.\n");
    for(int i = 0; i<10; i++){
        printf(":-\t");
        password[i] = getch();

        printf("\033[H\033[J");
        printf("\nPassword:");
        for(int j = 0; j<i+1; j++){
            printf("*");
        }
        
    }

    password[10] = '\0';

    printf("\nentered password: %s", password);
}

Comments

Popular posts from this blog

AI and Human Evolution

Snake Game using JAVA

To Do List App (GUI) using C#