I was recently testing out the "hello world" program in Code::Blocks using C. When setting the project up I chose C as the language, yet the file extension remained as .cbp. I manually changed this to .c and the program seemed to run fine.
However, when I closed the program and opened it back up again, it looked like this:
I have no idea why the code looks like this. I am trying to use Code::Blocks to write C code for University as it is the IDE that I am most comfortable using. If anyone could show me how to set everything up to be able to write C code I would be very grateful.
The .cbp file should not be renamed. It is, as indicated from the sample above, the CodeBlocks Project File. It is used by the IDE to keep track of the details of your project.
If you go ahead and create a project, choose "C" as the language and accept the default extension, you should find there is a separate file named "main.c" which is automatically created. That is the file where you will enter your own program code.