🌐
GeeksforGeeks
geeksforgeeks.org › techtips › how-to-compile-and-run-c-program-in-terminal
How to Compile and Run C program in Terminal - GeeksforGeeks
December 5, 2025 - ... If MinGW is installed correctly, the GCC version will appear. Use the cd command to go to the folder containing your .c file · Type "cd C:\MyPrograms" , Click Enter button. ... Your C program output will now appear in the terminal.
🌐
Support Your Tech
supportyourtech.com › home › articles › how to run c program in windows 10 command prompt: a step-by-step guide
How to Run C Program in Windows 10 Command Prompt: A Step-by-Step Guide
August 21, 2024 - If you named your output file ‘yourprogram’, type that name and hit Enter. Your C program should now run, displaying any output in the Command Prompt window.
Discussions

How to run C in windows
This is not a language problem, rather an IDE problem. I know VSCode has pretty bad support for C, and Visual Studio is quite massive, so that probably wouldn't work. Code::Blocks is a very lightweight IDE for C and C++, you could try that. More on reddit.com
🌐 r/C_Programming
22
1
August 19, 2021
gcc - Cannot run C program from command prompt on windows 10 - Stack Overflow
Connect and share knowledge within a single location that is structured and easy to search. Learn more about Teams ... I am using Windows 10 OS. I installed MinGW for compiling C programs. I tried running my program using the gcc command on the Command Prompt. More on stackoverflow.com
🌐 stackoverflow.com
Easiest way to set up C compiler on Windows 10 (if you use Visual Studio Code)?
The simplest way is to download and install "Build Tools for Visual Studio 2022", which includes the compiler (MSVC) and its command prompt. After that you open the compiler's command prompt and compile your code using the command: cl filename.c This will generate the file: filename.exe You can run it by simply executing: filename That's it! More on reddit.com
🌐 r/C_Programming
30
27
March 8, 2023
What to use to write and run C using Windows 10
Visual Studio Community 2022 https://visualstudio.microsoft.com/vs/community/ VScode is not very user friendly for setup for C++ or C for a beginner. I'm convinced people recommending it to beginners either: have amnesia, or don't pay attention to their audience and just spout their favorite IDE. "It really simple to setup VScode: you just need to go to the command line..." I'll stop you right there. LOL. If dude is asking what is WSL... More on reddit.com
🌐 r/learnprogramming
25
0
September 19, 2022
🌐
TechBloat
techbloat.com › home › how to run c program in windows 10 command prompt
How to Run C Program in Windows 10 Command Prompt - TechBloat
June 27, 2025 - Navigating to the directory containing the source code in Command Prompt. Compiling your code with gcc to generate an executable. Running the executable to see your program’s output. This fundamental process underpins many development workflows and is essential knowledge for any aspiring C programmer. Mastering the compilation and execution of C programs on Windows 10 via the Command Prompt empowers you with greater control and understanding of your development environment.
🌐
Wikihow
wikihow.com › computers and electronics › operating systems › windows › simple ways to run c program in command prompt
How to Run a C Program Using Developer Command Prompt
March 25, 2025 - Visual Studio installs a Developer Command Prompt that works just like CMD, but allows you to execute developer commands. Use the following steps to open the Developer Command Prompt. Click the Windows Start button.
🌐
Microsoft Learn
learn.microsoft.com › en-us › cpp › build › walkthrough-compile-a-c-program-on-the-command-line
Compile a C Program on the Command Line | Microsoft Learn
Choose Developer Command Prompt for VS 2017 to open the command prompt window. If you installed Microsoft Visual C++ Build Tools 2015 on Windows 10 or later, open the Start menu, and choose All apps.
🌐
Edureka
edureka.co › blog › how-to-compile-c-program-in-command-prompt
How to Compile & Run a C Program in Command Prompt?
July 23, 2024 - To compile and run your C program from the terminal without any problems, simply type hello.exe on a regular command prompt in a Windows environment or in a unix-like one, use the command ./hello.exe.
🌐
Reddit
reddit.com › r/c_programming › how to run c in windows
r/C_Programming on Reddit: How to run C in windows
August 19, 2021 -

i have very limited resources in my laptop (i3-10th gen). I want to run C programs, how to do that without any heavy software. I use VScode, i have installed python and it runs fine but i am struggling to run C.

i dont need something with too many features as i mainly learn P-Y-T-H_O-N now, but i would to be able to run a few of my older codes.

Find elsewhere
🌐
Support Your Tech
supportyourtech.com › home › articles › how to run a c program in windows 10: a step-by-step guide
How to Run a C Program in Windows 10: A Step-by-Step Guide
March 19, 2026 - Simply type hello.exe or .hello.exe into the Command Prompt and press Enter. You should then see “Hello, World!” printed right there in your command window. Congratulations, you’ve just compiled and run your very first C program on Windows 10!
🌐
Unstop
unstop.com › home › blog › how to run c program | step-by-step guide + detailed examples
How To Run C Program | Step-by-Step Guide + Detailed Examples
September 16, 2024 - To run the file, open the command prompt window. From there, navigate to the folder where the code file is present by using the cd command.
🌐
GeeksforGeeks
geeksforgeeks.org › compile-and-run-c-program-in-terminal
How to Compile and Run C program in Terminal?
Your All-in-One Learning Portal. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
🌐
Codeforwin
codeforwin.org › home › how to compile and run c program using command line in windows
How to compile and run C program using command line in Windows - Codeforwin
July 20, 2025 - Compiling C program from IDE is fairly simple. In this post I will explain how to compile and run C program using command line and GCC compiler in windows.
🌐
Stack Overflow
stackoverflow.com › questions › 63169670 › cannot-run-c-program-from-command-prompt-on-windows-10
gcc - Cannot run C program from command prompt on windows 10 - Stack Overflow
Also to compile and make an executable file, you have to put this command - "gcc -o nameofexecutablefile nameofsourcefile.c", to run this program just type the name of your executable file in cmd.
🌐
Support Your Tech
supportyourtech.com › home › articles › how to run c program in windows 10: a step-by-step guide for beginners
How to Run C Program in Windows 10: A Step-by-Step Guide for Beginners
August 20, 2024 - Running a C program in Windows 10 might seem tricky, but it’s actually pretty straightforward. You’ll need a compiler like GCC and an integrated development environment (IDE) like Code::Blocks. First, you’ll install the necessary software, write your C code, and finally compile and run the program.
🌐
Quora
quora.com › How-do-I-compile-and-run-C-programs-in-the-command-line-using-notepad-in-Windows
How to compile and run C programs in the command line using notepad in Windows - Quora
Answer (1 of 12): To learn any programming language ,it is better to start with notepad instead of using any IDE to write and execute programs. You can use TDM-GCC MinGW compiler. to download it use the link below: TDM-GCC MinGW Compiler 1.Now how to install TDM-GCC MinGW:- after download is ...
🌐
University of Auckland
cs.auckland.ac.nz › ~paul › C › Windows
Developing C programs on Windows
Great, now that Visual Studio Community is installed, you have two options for developing and running C programs on Windows. The first option involves using any text editor you like to write your source code, and using the "cl" command within the Developer Command Prompt to compile your code.
🌐
Reddit
reddit.com › r/c_programming › easiest way to set up c compiler on windows 10 (if you use visual studio code)?
r/C_Programming on Reddit: Easiest way to set up C compiler on Windows 10 (if you use Visual Studio Code)?
March 8, 2023 -

I've been learning C and playing around with it for a couple of months already.

I'm following CS50 course and first half of the course is almost entirely in C.

That being said, I only used their online codespaces so far, - and for my own personal practice, I used online complilers such as https://www.programiz.com/c-programming/online-compiler/

and https://www.onlinegdb.com/online_c_compiler .

This allowed me to focus on coding and not worry about compiling. I've made some stuff already, entirely using these tools.

However, now arrives the time that I need my own compiler on local machine.

The main reason is that I want to start practicing working with files on my own hard disk, and also using libraries outside of what these tools offer, such as conio.h.

I already tried to google how to set-up a compiler in Windows, but I've bumped into many hoops and obstacles and it's not (at least for me) as straightforward as it might seem.

So I'm asking you for help to set up my own coding environment for C in Windows, where I could compile the files (ideally with make too, and not just clang), where I could include external libraries, where I could work with files on my own HDD, etc... And ideally, where I could even turn these files into classical .exe files.

Thanks!

EDIT: Resolved:

Installing Visual Studio 2022 Community with included tools for C++, and then running Developer Command Prompt allowed me to compile C files by using command: cl filename.c which returns exe file, filename.exe . This exe file can be started by simply executing filename in command prompt or even from Windows by simply double clicking on its icon, like any other file. Thanks for all the responses, especially to RidderHaddock and _mutaz_ who gave me best directions.

🌐
Medium
medium.com › @bryanahusna › how-to-setup-and-run-c-code-on-windows-pc-14be6980c1f
How to Setup and Run C Code on Windows PC | by Bryan Amirul Husna | Medium
January 2, 2022 - At this point, you can’t use MinGW yet. What configuring Path does is basically integrating the MinGW program and its command into Command Prompt, so that you can use it to compile your code. To do it, search Environment Variables in the Windows Search Bar.
🌐
Linux Hint
linuxhint.com › compile-and-run-c-program-command-prompt
How to Compile and Run a C Program in Command Prompt – Linux Hint
In this tutorial, we will study how to compile as well as run a C program in a Command Prompt. It will help users who don’t want to install separate compilers to execute C programs on their windows systems.