The reason this happens is because the display is updated between the times when you clear the console screen and actually draw it. This can usually happen so fast that you never see it, but from time to time you do it at the right time, and you experience flickering.
- , , , , WriteConsoleOutput. , , , , , .
BOOL WINAPI WriteConsoleOutput(
_In_ HANDLE hConsoleOutput,
_In_ const CHAR_INFO *lpBuffer,
_In_ COORD dwBufferSize,
_In_ COORD dwBufferCoord,
_Inout_ PSMALL_RECT lpWriteRegion
);