From: jkeene AT unlinfo DOT unl DOT edu (Jon Keene) Subject: Question reagarding kbhit() To: djgpp AT sun DOT soe DOT clarkson DOT edu Date: Mon, 27 Feb 1995 00:33:38 -0600 (CST) Could anyone tell me why it is that when I run the following program, it pauses for the keyboard hit _before_ doing any output? Ponderously yours, Rumball --- #include #include #define BUFSIZE 1840 /* (80 * 23) */ #define BLANK ' ' main () { int i; int buf[BUFSIZE]; for ( i = 0; i < BUFSIZE; i++ ) buf[i] = BLANK; buf[0] = 'a'; buf[BUFSIZE - 1] = 'z'; for ( i = 0; i < BUFSIZE; i++ ) printf("%c", buf[i]); while (!kbhit()) ; return 0; } --