Hello, I have a general question about the C programming language. I have programmed the below program in Codeblocks. I have now closed Codeblocks and I would like to run only the .exe file. So I go to the corresponding folder \bin\Debug and there is the .exe file. As soon as I execute the file, the command prompt opens very briefly but nothing else happens. When I run the .c file into code blocks and run it, the program executes properly. My question: Why does the created .exe file not work? Because if I am right the automatically created .exe file should behave in the same as the program executed directly in codeblocks.
Why the .exe file does not open, mayby my settings are not ok. Attached is also a video.
Download | file.io
Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x;
for(x=0;x<10;x=x+1,printf("%d\n",x))
;
return 0;
}