Many people have this question "How do you keep the console from closing after the program is done in C" but my question is a bit different. When i run the .exe a window opens and closes really quickly but why does the window open in the first place?
I mean... I get that if I tried to print something, a console window would be necessary but even if I'm running the sample code below a console window will pop up and I don't know why.
int main() {
int i;
for (i=0; i<100; ++i) {
++i;
}
}