Hi, everyone!
I've a simple question on 'printf' function. See the code below:
Code:
#include <stdio.h>
int main (void) {
printf("this \n");
printf("confused me\n"); // a breakpoint is set here.
return 0;
}
After compiling the code, I set a breakpoint (see above) in GDB.
As expected, "this \n" is printed if the execution reaches the breakpoint.
If I remove '\n' in "this \n" and run the code as above. "this " will NOT be printed if the execution reaches the breakpoint.
So, this confused me a lot! Any help are highly appreciated! Thank you!