As I beginner, I typed the following hello world program on Code::Blocks -
#include<stdio.h>
main()
{
printf("Hello world \n");
}
Now, I click on 'Build and Run', and the output screen shows 'Hello world'.
However, the book I am reading from, suggests me to remove certain elements of the program to see what errors occur in the program.
I made 2 changes. First, I removed \n from the program. (The book tells me that without \n, there will be an error running the program) However, when I click on 'Build and Run', the output screen gives me the same output it did when it was without any errors.
The second change I made was removing #include from the program. Even now, the output screen shows the same output it did when it was free from errors.
Why is this happening? Please tell me how to fix this?
The compiler I am using is GNU GCC compiler.
EDIT: As suggested, I added -wall, -wextra, -pedantic. Now, when I click on 'Build and Run', it says cannot find -1-wall, -1-wextra and -1-pedantic and the program doesn't run. How to fix this now?