![]() ![]() getchar() sees that there's another character ( \n) still waiting on the standard input, and returns it immediately. Your code now prints the second prompt, and calls getchar() again.getchar() returns the first character available to your program on the standard input, i.e.Your terminal now send the characters you typed ( X and \n) to your program. ![]() Since your terminal is line buffered, your program doesn't see it yet, and so remains paused.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |