CC++Learn C++

How To Run A C Program

How To Run A C Program

C and C++ are two of the most powerful programming languages and they can be run by free C++ IDE and compiler for the different operating systems like Windows and mobile. Using a fast and reliable C++ compiler for Windows is very important for beginners and professionals since it helps C++ developers in remembering which language features exist, how to use them, and even detect errors when we get it wrong.

You can run a C program using the C or C++ compilers and build tools in C++ Builder. C++ Builder has free C++ Builder Community Edition and C++ Builder Professional / Architect / Enterprise Versions.

As a C++ compiler, in my opinion, the best professional C++ IDE and code editor to implement C++ Programs for Windows and mobile devices is the latest version of RAD Studio or C++ Builder,

How to run a C program with the free C++ Builder Community Edition?

How To Run A C Program The C++ Builder Logo

In general, thanks to the language’s shared heritage, you can run C programs with the latest C++ IDEs. C++ Builder Professional, Enterprise and Architect Editions are able to run C programs. There is a free C++ Builder Community Edition for students, beginners, and startups too. You can, for example, download, install and run your C programs as console applications. Moreover, you can enhance your C programs with C++ features and modern GUIs, which means you can mix and use C and C++ together. For the best modern app, later if you wish, you can update your C program to a C++ program.

C++ Builder is the easiest and fastest C and C++ IDE for building simple or professional applications on the Windows, macOS, iOS & Android operating systems. It is also easy for beginners to learn with its wide range of samples, tutorials, help files, and LSP support for code. C++ Builder comes with Rapid Application Development Studio, also known as RAD Studio. RAD Studio’s C++ Builder version comes with the award-winning VCL framework for high-performance native Windows apps and the powerful FireMonkey (FMX) framework for cross-platform UIs.

How To Run A C Program The RAD Studio IDE in light mode
The Latest RAD Studio C++ Builder Welcome Screen

You can download the free C++ Builder Community Edition here:

Professional developers can use the Professional, Architect or Enterprise versions of C++ Builder. Please visit

Download RAD Studio 11 Now

See What’s New in RAD Studio 11

How to create and run A C program project in C++ Builder?

Normally you can create a new C or C++ source code file with an editor or IDE. When you compile a C++ file it will use a linker to create the final output. You can also create executable files by using compiler binary at a command prompt with the link option. For Windows, this created executable file is an EXE file which is a special format containing the actual machine code of your program and additional instructions and resources. The Windows operating system loads this EXE file and uses it to execute the instructions of your program code. Note that generally C++ source code filenames have the .cpp extension, C files have the .c extension. Header files have the .hpp or .h extensions. Generally the main include files are placed in the ‘include path’ of the compiler. To run a program just type the executable output in command line or double click on it in your operating system.

Compiling Cpp files results in creating executable applications from these cpp files. You can use Embarcadero C++ Builder compilers (bcc32*.exe) , Dev-C++ compiler, gnu compiler (aka gcc compiler), visual studio code or other C and C++ compilers.

C++ Builder greets you with a Welcome Screen. You can create a new project by using File->New menu on the top. By using this menu. You can create a new MultiDevice Application in C++ Builder with FireMonkey framework or a new Windows VCL Application in C++ Builder with VCL framework or you can create a Console Application in C++. There are more options to develop more professional static, dynamic libraries.

How To Run A C Program the RAD Studio IDE with C program code showing in it
RAD Studio C++ Builder in the Dark Mode

When you create a project this will create a Project source code file and a Unit which has a visual window. Your project will have .bpr, .cpp, PCH.h files. This project also includes two more .cpp and .h units. You can start designing your app with this ready-made unit as launching point, adding your own code by modifying these Unit files and its .h header. You can add more Units with new .cpp and .h files in your project..

More details about C++ Builder & RAD Studio for the beginners can be found in Official Wiki of Rad Studio.

How to run a C program with C++ Builder and GUI frameworks?

C++ Builder, RAD Studio is the easiest and fastest C and C++ IDE for building simple or professional applications. One of the great features is its Designer which is full of a rich toolset of many new features, which is known as Graphical User Interface (GUI or UI). You can easily add new visual UI elements which are called as Components. Just choose a component, i.e Button (TButton), Edit (TEdit), Memo (TMemo), Label (TLabel), etc. from the Palette Windows you want to use and drag on to your form design. When you click on a component you can drag them to a new position or you can change its width height and corner positions by pressing blue squares around it. When you do this, it will guide you with lines to show make it aligned with other component edges.

While the C++ Builder and its GUI frameworks (FMX,VCL) are completely designed for the professional C++ apps, you can use its GUI frameworks with your C programs too. Which means you will have C++ app using C functions and program.

How To Run A C Program An app in the RAD Studio IDE

Every component may have different properties or events. You can check them and you can change their properties manually by clicking on them and using Object Inspector. Some components generate their basic events in the code editor automatically. For example, you can double click the Button to write your “button click” code (that is executed when the user clicks on the button) inside it. This concept of “code behind” is key to how C++ Builder works and is central to how easy it is to write really great, visually stunning C++ programs with it.

If you are new to programming or even if you coming to C++ from another programming language, sometimes it is hard to understand how to write C_++ code, how to design the screens and how to compile and run your apps. In this post we will explain how to compile C++ code in Windows to produce Modern C++ applications in Windows

If you have trouble, here is more detailed post that explains how you can compile C++ apps on Windows,

How to run A C program with a free C++ compiler?

There are different Embarcadero C++ Compilers for different purposes. These are bcc, bcc32c, bcc32x, bccaarm, bcc64 executable compilers. developed by Embarcadero Technologies, Inc. There is a free Win32 compiler officially listed as a free C++ Compiler on the Official Web Page of Embarcadero.

How To Run A C Program The BCC compiler in action

This free download of the C++ Compiler includes C11 language support, the Dinkumware STL (Standard Template Library) framework, and the complete Embarcadero C/C++ Runtime Library (RTL). In this free version, you’ll also find a number of C/C++ command line tools—such as the high-performance linker and resource compiler.

C++Builder includes compilers for Win32, Win64 and iOS. And, C++Builder also features a modern, high-productivity RAD Studio IDE, debugger tools, and enterprise connectivity for to accelerate cross-platform UI development. Learn more about RAD Studio on its product page.

You can simply use one of these C++ compiler to compile C programs. For example, if your c program file is myproject.c you can compile this with optimization level 2 (-o2) as below,

How to run a C program with a free Dev-C++ IDE and compiler?

Dev- C++ is a fast, portable, simple, and free C and C++ IDE for Windows. You can compile and run C and C++ files with Dev-C++ too, download the latest Embarcadero Dev-C++ free.

How To Run A C Program The DevC++ logo

The free version is great for beginners. If you want to develop professionally it is highly recommended that you start with the C++ Builder CE version. Dev-C++ can be downloaded from Embarcadero’s site, Sourceforge, or Github. The original developer is Bloodshed Software.

How To Run A C Program. The DevC++ IDE main screen.

Embarcadero Dev-C++ is a new and improved fork (sponsored by Embarcadero) of Bloodshed Dev-C++ and Orwell Dev-C++. It is a full-featured Integrated Development Environment (IDE) and code editor for the C/C++ programming language. It uses Mingw port of GCC (GNU Compiler Collection) as its compiler. Embarcadero Dev-C++ can also be used in combination with Cygwin or any other GCC based compiler. Embarcadero Dev-C++ is built using the latest version of Embarcadero Delphi. Embarcadero Dev-C++ has a low memory footprint because it is a native Windows application and does not use Electron.

You can download the free and open-source Dev-C++ here

Download and install the latest C++ Builder or RAD Studio IDE now!

How To Run A C Program the C++ Builder logo

You can download the free C++ Builder Community Edition here:

Professional developers can use the Professional, Architect or Enterprise versions of C++ Builder. Please visit

The latest new posts, more examples and tutorials can be found at this dynamic C++ link for and on the dedicated C++ site which is a great totally free resource packed full of articles where you can easily improve and expand your C++ programming knowledge and skills.

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome C++ content in your inbox, every day.

We don’t spam! Read our privacy policy for more info.

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial

Free C++Builder Community Edition

About author

Dr. Yilmaz Yoru has 35+ years of coding with more than 30+ programming languages, mostly C++ on Windows, Android, Mac-OS, iOS, Linux, and some other operating systems. He graduated and received his MSc and PhD degrees from the Department of Mechanical Engineering of Eskisehir Osmangazi University. He is the founder and CEO of ESENJA LLC Company. His interests are Programming, Thermodynamics, Fluid Mechanics, Artificial Intelligence, 2D & 3D Designs, and high-end innovations.
Related posts
C++C++17Language FeatureLearn C++

How To Use Skia Images in C++ Builder?

C++C++17Code SnippetGame DevelopmentLanguage FeatureLearn C++

What Is Skia In Modern C++?

C++C++17Learn C++

How To Use Skia in C++ Builder 12?

C++C++17C++20Introduction to C++Language FeatureLearn C++Syntax

Learn How To Use Clamp (std::clamp) In Modern C++ 17 and Beyond