CodeBlocks – C and C++ Compiler Software

  1. Download and install Compiler software (CodeBlocks). your  version compatible with your system. Notice ‘mingw’ word in the file name. Because ‘mingw’ is the compiler included in CodeBlocks software.
    Ex: codeblocks-20.03mingw-setup.exe
  2. Open New file ( File >> New >> Empty file )
  3. Save the file ‘welcome.c’ or ‘welcome.cpp’
  4. Write the sample code given below:
    C Program File Name: welcome.c
    void main()
    printf("Welcome to C Programming!");

    C++ Program File Name: welcome.cpp
    using namespace std;
    int main()
    cout << "Welcome to C++ Programming!";
    return 0;
  5. Compile/Build the file ( Build Menu >> Build ) or keyboard Shortcut ‘Ctrl+F9’
  6. Run/Execute the file (Build Menu >> Run ) or keyboard Shortcut ‘Ctrl + Shift + F9’
  7. Success! Your are ready for programming.