1. Your program suffers from the same bug that gets() contains -- it will allow you to enter more characters than can be held in the input buffer. The do-while loop needs to check that buffer overflow does not occur.
2. The input buffer is not null-terminated, which might explain why the final printf() displays incorrect information. You can easily correct this by
3. The program does not handle backspace and arrow keys. So if you make a typing mistake there is no way to correct it.
Last edited by Ancient Dragon; Sep 18th, 2006 at 11:07 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,953 posts
since Aug 2005