Flush Libc Buffer
Question Text
Which of the following is a method of flushing libc’s internal buffer?
Question Answers
-
print a
\0character -
print a
\ncharacter -
print a space character
-
print a
\tcharacter
Feedback
Newlines (\n) force printf() to dump the internal buffer associated with the stdout FILE struct. If you place a \n character within one of the strings in support/buffering/printf_buffering.c, a write() syscall will be made right after it.