void main()
{
int i;
char ch;
while(ch=getch()!='\0')
{
i++;
printf("%c",ch);
}
printf("you type %d characters\n",i);
}
#include <stdio.h>
#include <conio.h>
int main()
{
int i = 0;
char ch;
while (ch = _getch() != '\0')
{
i++;
printf("%c", ch);
}
printf("you type %d characters\n", i);
}