How to create and run C program using CodeBlocks
Introduction
CodeBlocks
is a cross-platform (Linux, Mac, Windows (uses wxWidgets)), open-source, free
IDE that supports GCC, Visual C++, and Clang compilers.
CodeBlocks
is a powerful IDE for creating, compiling, executing and debugging C/C++
programs.
Please read previous post : How
To Install CodeBlocks IDE on Windows
Create C Program In CodeBlocks IDE
- Open CodeBlocks, go to Start Menu > All Apps > CodeBlocks > CodeBlocks.
- Click on the File menu, select New > File…
- From the New form template window select “C/C++ source” and click the “Go” button.
- If you see a welcome message, click the “Next >” button to skip the welcome message.
- On the next window, select your language from C/C++ source window and click the “Next >” button.
- On the next window,
- Click the ellipsis button present under “Filename with full path :” Browse your C workspace (folder), navigate to save workspace (folder) (ex: D:\CodeBlocks\).
- Click the “Finish” button.
- Write and save your first C program. Press "Ctrl+S" to save. Ex :
Source Code :
Compile and run C program in CodeBlocks
- Go
to menu Build > "Build and Run" or just press F9
and then OK, when you are asked if you want to build the project.
- A console will open and you will see the greeting on the screen.
No comments
Pembaca yang baik selalu meninggalkan komentar sesudah membaca ^_^
Terimakasih sudah mengisi komentar