
i want that when i hit any key only * to be print not the hit key in c language

The given example will display aestricks on hitting any key.
#include "stdio.h"
#include "conio.h"
#include "ctype.h"
int main()
{
char data[15]; /* max length 14 characters say */
int index = 0;
int i;
for(i = 0; i < 15; i++) data[i] = '\0';
printf("Enter data : ");
while(index < 14)
{
char ch = getch();
if(ch == 13)
{
break;
}
else if (ch == 8)
{
if (index > 0)
{
putchar(8);
putchar('\0');
putchar(8);
index--;
data[index] = '\0';
}
}
else if (isalnum(ch))
{
putchar('*');
data[index] = ch;
index++;
}
}
printf("\nYour data is %s\n\n", data);
return 0;
}

it is not that exactly what i want .I want when we ask input user hit any key (defautly hit button is shown in compiler) i want only * to be print
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.