C VScode
In the previous chapter we introduced basic C concepts and examples; in this chapter we will introduce an editor for C code -- VScode.
VSCode (full name: Visual Studio Code) is a free cross-platform source code editor developed by Microsoft; the VSCode development environment is very simple and easy to use.
C/C++ support for VScode is an extension of Visual Studio Code provided by Microsoft; it enables cross-platform C and C++ development on Windows, Linux, and macOS.
When you create a *.c or *.cpp file, the extension adds features such as syntax highlighting (coloring), intelligent completion and hover, and error checking.

Install VS Code
Installing VSCode is also simple: open the official site https://code.visualstudio.com/, download the package and install it step by step. During installation, pay attention to the installation path setting and that environment variables are added to the system automatically; check all the following options:

For the full VSCode installation tutorial, see:https://www.runoob.com/vscode/vscode-tutorial.html
Install the C/C++ extension
- 1. Open VS Code.
- Click the Extensions icon in the left menu bar or use the keyboard shortcut (⇧⌘X) to open the Extensions view.
- Search
C++. - Select the following extension and click Install.

Create a C code file
Open VScode and click New File:

Click to select the language:

Enter c in the search box to create the test.c file:

Enter the code, save the test.c file, right-click the file name, and execute the following command in the integrated terminal:
Example
#include
int
main
(
)
{
/* My first C program */
printf
(
"Hello, World! \n"
)
;
return
0
;
}
