Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void main()
- {
- char password[10],username[10], ch;
- int i;
- printf("Enter User name: ");
- gets(username);
- printf("Enter the password : ");
- for(i=0;i < 8;i++)
- {
- ch = getch();
- password[i] = ch;
- ch = '*' ;
- printf("%c",ch);
- }
- password[i] = '\0';
- /* If you want to know what is username & password, you can print it*/
- printf("\n\nYour username is : %s ",username);
- printf("\nYour password is : %s",password);
- }
Advertisement
Add Comment
Please, Sign In to add comment