#include <stdio.h>
#include <conio.h>
void main()
{
char pasword[10],usrname[10], ch;
int i;
clrscr();
printf(“Enter User name: “);
gets(usrname);
printf(“Enter the password <any 8 characters>: “);
for(i=0;i<8;i++)
{
ch = getch();
pasword[i] = ch;
ch = ‘*’ ;
printf(“%c”,ch);
}
pasword[i] = ‘\0′;
/*If you want to know what you have entered as password, you can print it*/
printf(“\nYour password is :”);
for(i=0;i<8;i++)
{
printf(“%c”,pasword[i]);
}
}
/*———————————————–
Output
Enter User name: Latha
Enter the password <any 8 characters>: ********
Your password is :Wipro123
———————————————–*/
Not Satisfied ? Just search & get the result
Related posts:
- C program to find the value of sin(x) using the series up to the given accuracy (without using user defined function) Also print sin(x) using library function.
- C program to find the value of cos(x) using the series up to the given accuracy (without using user defined function) Also print cos(x) using library function.
- C program to read two integers M and N and to swap their values. Use a user-defined function for swapping. Output the values of M and N before and after swapping with suitable messages
- How can i Hide the Last User Logged On User
- How to Resolve “The User Profile Service failed the logon. User profile cannot be loaded” Problem
