Homework Assignment 2
Due Feb. 4, 2000
while(1)
{
while (!kbhit()) ; /* Wait for key to be pressed; */
c = getchar(); /* Get key */
send_data(c); /* Send to receiving computer -- you need to
write this routine */
}
The main part of the receiving program could be:
while(1)
{
c = get_data(c); /* Get data from sending computer -- you need to
write this routine */
putchar(c); /* Write to standard output (screen) */
}
Show that you can type on the keyboard of one computer, and have the
keystrokes appear on the screen of the second computer.