Hi,
Because you are using buffered input anytime you press enter key an newline character is entered into the keyboard buffer, and later your server program uses this newline as the new input so you have to empty the keyboard's buffer.
You can do it in two ways:
1- use the fflush() function...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.