| 1 |
#include <iostream> |
| 2 |
#include <cstdio> |
| 3 |
using namespace std; |
| 4 |
|
| 5 |
int main() |
| 6 |
{ |
| 7 |
cout << "hel" << flush; |
| 8 |
printf("lo wo"); |
| 9 |
fflush(stdout); |
| 10 |
cout << "rld" << '\n'; |
| 11 |
} |
| 12 |
/* |
| 13 |
Generated output: |
| 14 |
|
| 15 |
hello world |
| 16 |
|
| 17 |
Without the flushes: |
| 18 |
|
| 19 |
helrld |
| 20 |
lo wo |
| 21 |
*/ |