geekdevil 0 Newbie Poster
include<iostream.h>
include<conio.h>

void main()
{
int z[33];

clrscr();

cout<<"Enter any Password (32 character max): ";

for(int i=0;i<33;i++)
{

z[i]=getch();

    if(z[i]==13)
    {
    break;
    }

cout<<"*";

}

cout<<"\nYou entered : ";

for(int j=0;j<=32;j++)
{

    if(z[j]==13)
    {
    break;
    }

cout<<(char)z[j];

}

getch();

}

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.