English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

similar to the display of password

2007-02-16 20:57:04 · 3 answers · asked by hariesh prabu 1 in Computers & Internet Programming & Design

3 answers

ONE EXAMPLE OF PROGRAM IN C LANGUAGE. THIS LANGUAGE ORIGINED THE MS-WINDOWS AND JAVA LANGUAGE:

# INCLUDE # INCLUDE

VOID MAIN () {

CHAR A[5];
INT I=0;

DO {

GETCH();
PRINTF("*");
A[I]='\0';

WHILE(A[I++]<=5)
}

PRINTF(" %S", &A);

}

HAVE A NIVE WEEKEND AND GOOD LUCKY!

2007-02-16 21:50:31 · answer #1 · answered by Rodrigo 2 · 0 0

Do know about getch() function. It'll return the return the ascii value of the key returned but won't display it in screen..

program will be roughly like this,

char a[10];
int i=0;

while((a[i++]=getch()) !='\n')
printf("*");

a[i]='\0';

printf(" %s ",a);

It's not tested...

All the best..

2007-02-16 21:28:45 · answer #2 · answered by Anonymous · 1 0

not very sure, but i think you have to remove the echo so that the letter you type is not displayed then add a dummy * character using printf if character is typed

2007-02-16 21:28:54 · answer #3 · answered by dragongml 3 · 0 0

fedest.com, questions and answers