Originally Posted by
sanjay.nitk
hello everyone,
I have a program below :
What I want is that characters should be printed as soon as it is entered.
Can u tell me some solution to it ???????
Code:
#include<stdio.h>
int main()
{
char ch,choice;
int val=0;
clrscr();
while(val)
{
printf("\nenter the char\n");
ch=getche(); //get the char from user
putch(ch); //immediately display that char
printf("\nwant to continue..?(Y/N)\n");
choice=getche();
if(choice=='y' || choice=='Y')
val=1;
else val=0;
}
return 0;
}
As far as i understood ur problem statmnt, this is what i think you wanted..