git bash, how to see progressing printf() while running?

Viewed 127

I've installed mingw64 to use gcc in git bash, and I'm programming simple c program. And there are the codes for example

for(int i=0;i<5;i++)
{
  printf("hello\n");
  sleep(3);
}

when I compile it and run this code ./a.exe like this the output comes out when the program is finished not while in progress. When I use Linux console exactly the same code as above, the printf() works and shows on the console while it is running. I would like the git bash to do the same. can you help me?

0 Answers
Related