Hello,

Program more simplified by me

there is only one last problem
why is the @ sign OR ANY OTHER GRABAGE VALUE comming at the end of the password ??

PHP Code: 
#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
    
clrscr();
    
char pass[32], ch;
    
printf("Enter Password : ");
    
int j=0;
    while(
1)
    {
    
ch=getch();
    if(
ch=='q' || ch=='Q')
    break;
    
pass[j]=ch;
    
putchar('*');
    
j=j+1;
    }
    
j=j+1;
    
pass[j]='\0';
    
printf("\n\n Password is : %s",pass);
    
getch();



OUTPUT