My code has everything ok! But I don't get any output on the console. This is my code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
My code has everything ok! But I don't get any output on the console. This is my code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
I think Anti-virus might be causing a problem for you. Try excluding the folder that contains your file. There was another question posted with same problem and for that excluding the folder worked. Code::Blocks console app won't show output
I experienced this same problem on linux; installing xterm solved the problem for me.
See Settings > Environment > General Settings > Terminal to launch console programs
Please include getchar() in the function before return statement. This happens because the computer is executing your program and doesn't wait for you to see the output. Including getchar(), at the end mandates it to wait for an input & in the meanwhile you can observe your output
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
getchar();
return 0;
}