Windows has always been a pain to me since I have a potato PC and I can't run visual studio. In your case, you either Use a fully blown ready to use (bloated) IDE, like Visual Studio, CodeBlocks and CLion (Not suitable for potato PCs/Laptops). Spend some time to configure/customize your code editor, E.G. vscode or vim (or neovim). In my experience, no matter which editor you use, having a C++ installation of visual studio saves some time of configuring the PATH and toolchain directory and stuff (especially if you're a beginner). Answer from wwg_6 on reddit.com
๐ŸŒ
Visual Studio Code
code.visualstudio.com โ€บ docs โ€บ languages โ€บ cpp
C/C++ for Visual Studio Code
November 3, 2021 - C/C++ support for Visual Studio Code is provided by a Microsoft C/C++ extension to enable cross-platform C and C++ development on Windows, Linux, and macOS. When you create a *.cpp file, the extension adds features such as syntax highlighting ...
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ how-to-write-and-run-c-cpp-code-on-visual-studio-code
How to Write And Run C and C++ Code in Visual Studio Code
January 20, 2023 - After writing your code, you can run the code directly using the play button you'll find in the upper right corner. This is how you can run any C/C++ program from VS Code/Insiders
Discussions

What tools do you use with Visual studio code to run C code ?
Windows has always been a pain to me since I have a potato PC and I can't run visual studio. In your case, you either Use a fully blown ready to use (bloated) IDE, like Visual Studio, CodeBlocks and CLion (Not suitable for potato PCs/Laptops). Spend some time to configure/customize your code editor, E.G. vscode or vim (or neovim). In my experience, no matter which editor you use, having a C++ installation of visual studio saves some time of configuring the PATH and toolchain directory and stuff (especially if you're a beginner). More on reddit.com
๐ŸŒ r/C_Programming
55
15
July 29, 2022
Running a simple C program using VS code - Stack Overflow
As a result the program might be ready to take your input but you just cannot see any text asking you to do so. Try adding a \n at the end of your printfs. For a quick test you can just start typing your age without waiting for the prompt message. ... You might add the current version of your code ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Trouble Installing and Running C Programs in VS Code
Select Topic Area Question Body Hi everyone, I'm having trouble setting up C programming in Visual Studio Code. I have installed VS Code, but I'm not sure how to properly install the C comp... More on github.com
๐ŸŒ github.com
3
1
C in Visual Studio Code
Why downloading plugins for CSS and HTML? To compile C all you need is an compiler. There is a tutorial which explains everything you need for a simple hello world program: Configure VS Code for Clang/LLVM on macOS (visualstudio.com) More on reddit.com
๐ŸŒ r/C_Programming
14
April 26, 2024
๐ŸŒ
Visual Studio Code
code.visualstudio.com โ€บ docs โ€บ cpp โ€บ config-mingw
Using GCC with MinGW
November 3, 2021 - Remember, the C++ extension uses the C++ compiler you have installed on your machine to build your program. Make sure you have completed the "Installing the MinGW-w64 toolchain" step before attempting to run and debug helloworld.cpp in VS Code.
๐ŸŒ
Visual Studio Marketplace
marketplace.visualstudio.com โ€บ items
C/C++ for Visual Studio Code
Extension for Visual Studio Code - C/C++ IntelliSense, debugging, and code browsing.
๐ŸŒ
Medium
medium.com โ€บ @ochwada โ€บ c-programing-setup-in-visual-studio-code-bd4cb60e58ff
C Programming โ€” Setup in Visual Studio Code | by Ochwada | Medium
November 16, 2024 - Low-Level Access: C provides low-level memory manipulation via pointers and direct interaction with hardware. Structured Programming: C promotes structured programming practices through features like functions, which allow for code modularity, ...
๐ŸŒ
Quora
quora.com โ€บ How-do-I-set-up-vs-code-for-C-programming-I-am-a-beginner-and-need-help-with-this
How do I set up vs. code for C programming? I am a beginner and need help with this.
Answer (1 of 4): First, if youโ€™re a Windows user, Iโ€™d recommend you download and use Visual Studio instead. The Community edition is free and is much more powerful than Visual Studio Code (which isโ€”surprisinglyโ€”unrelated to Visual Studio). Barring that, you need at least one C Extension for VS C...
Find elsewhere
๐ŸŒ
Visual Studio Code
code.visualstudio.com โ€บ docs โ€บ cpp โ€บ config-msvc
Configure VS Code for Microsoft C++
November 3, 2021 - Remember, the C++ extension uses the C++ compiler you have installed on your machine to build your program. Make sure you have a C++ compiler installed before attempting to run and debug helloworld.cpp in VS Code.
๐ŸŒ
Javatpoint
javatpoint.com โ€บ how-to-run-a-c-program-in-visual-studio-code
How to run a C program in Visual Studio Code - javatpoint
How to run a C program in Visual Studio Code with Tutorial, C language with programming examples for beginners and professionals covering concepts, c pointers, c structures, c union, c strings etc.
๐ŸŒ
Reddit
reddit.com โ€บ r/c_programming โ€บ c in visual studio code
r/C_Programming on Reddit: C in Visual Studio Code
April 26, 2024 -

I want to practice C in Visual Studio Code (mac). I was already prompted to download a bunch of add ons for C and other languages such as CSS and HTML.

I wrote my code and tried to run the executable in the terminal but apparently I need to download the "command line developer tools" package. I had to stop myself because it requires a whopping 15.6 GB of disk space while the program itself is only 580 mb. How can this be if there are sandbox programs which you can code in on your browser? As far as I understood people have been coding in c since a hard drive of 512 mb was considered big...

๐ŸŒ
PW Skills
pwskills.com โ€บ blog โ€บ cpp โ€บ can i use c programming in vs code? explained in detail!
Can I Use C Programming In VS Code? Explained In Detail!
November 4, 2025 - After building, you can use the debugger (if configured) or run the compiled executable manually. Also read: 75 Basic Programming Problems and Tutorials for Practice ยท The short answer is yes, you can use C programming in VS Code.
๐ŸŒ
Visual Studio Code
code.visualstudio.com โ€บ docs โ€บ cpp โ€บ config-linux
Using C++ on Linux in VS Code
November 3, 2021 - In this tutorial, you will configure Visual Studio Code to use the GCC C++ compiler (g++) and GDB debugger on Linux. GCC stands for GNU Compiler Collection; GDB is the GNU debugger. After configuring VS Code, you will compile and debug a simple C++ program in VS Code.
Top answer
1 of 2
3

The guide for using C++ with Visual Studio Code is located here:

  • C/C++ for Visual Studio Code

If you are using the windows operating system, you can install the Microsoft Visual C++ (MSVC) compiler toolset as described here:

  • Configure VS Code for Microsoft C++

Otherwise you should read the tutorials for the compiler you want to use:

  • Tutorials for other compilers

The reason I refer to links, instead of explaining the details here, is because the answer might become outdated/obsolete. Sometimes links are better than explanations.

2 of 2
2

Step 1. Download the MinGW - Minimalist GNU for Windows at SourceForge, link here.

When you download Minimalist GNU for Windows (MinGW), you can choose which packages to install. You should select the following packages:

  • mingw-developer-toolkit
  • mingw32-base
  • mingw32-gcc-g++
  • msys-base

Then click on the Installation tab on the top left and click on Apply Changes.

After installation, go to your C Drive where the MinGW is installed, and enter the folders MinGW > bin. Copy the path C:\MinGW\bin

Now search for environment, and enter edit environment variables for your account. screenshot

Next, double-click on Path, click on New, paste the path C:\MinGW\bin, press enter, and click OK.

Verify that it has been installed correctly by opening up Command Prompt and typing in gcc --version. It should give you the current version number.

Step 2. In Visual Studio Code, click on the Extensions tab, search and install Code Runner by Jun Han

Step 3. In the C/C++ Configurations. Make sure the Compiler Path has c:/MinGW/bin/gcc.exe selected. screenshot 2

You can get to it by opening Command Pallet (ctrl+shift+p) typing in C/++: Select a Configuration.. then select Edit Configurations (UI)

๐ŸŒ
DEV Community
dev.to โ€บ narottam04 โ€บ step-by-step-guide-how-to-set-up-visual-studio-code-for-c-and-c-programming-2021-1f0i
[Step By Step Guide] How to set up visual studio code for C and C++ programming 2021. - DEV Community
August 5, 2021 - You can copy and paste the code that I have provided below. #include<iostream> using namespace std; int main() { cout<<"hello world"; } Right click and click on run or press keyboard shortcut 'Ctrl+Alt+N'. And there you go you have written your first program in C++, I hope this tutorial was helpful if you are facing any problem while installing let me know in the comment section or email me at blog.webdrip.in.
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 65598881 โ€บ how-to-compile-c-program-in-visual-studio-code
How to compile C program in Visual Studio Code? - Stack Overflow
I would do anything to see the output of the program, please help me. ... Use GCC after having read its documentation (e.g. with gcc -Wall -Wextra -g). Consider installing Debian on your laptop (it provides both gcc and the gdb debugger, and also GNU emacs...). Read of course Modern C and this C reference ... Sign up to request clarification or add additional context in comments. ... I installed the extensionshowed in this page code.visualstudio.com/docs/languages/cpp I thought it was a debugger.
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ answers โ€บ questions โ€บ 5675323 โ€บ how-to-run-program-in-c-in-visual-studio-code
how to run program in c in visual studio code - Microsoft Q&A
December 21, 2025 - Debugging: To debug your program, you will need to set up a launch configuration. Go to the Run view (left sidebar) and click on create a launch.json file. Choose C/C++: g++ build and debug active file. This will create a launch.json file where you can configure debugging settings. Start Debugging: Set breakpoints in your code by clicking in the gutter next to the line numbers.
๐ŸŒ
Quora
quora.com โ€บ How-can-I-run-a-C-program-in-a-Visual-Studio-Code
How to run a C program in a Visual Studio Code - Quora
Answer (1 of 8): * You should first go to option create a new project in file menu. * Then enter the name of project press OK and accept the defaults and press finish. * Then a new terminal is opened for you on the screen . * Then you should type a syntactically correct program. [code]For exa...