How to run C programs in Notepad
Step 1: Install MinGW (Minimalist GNU for Windows)
To compile and run C program, you need to install MinGW, which is a GNU compiler toolchain for Windows. Download and install MinGW from the [MinGW website](https://sourceforge.net/projects/mingw/).
Step 2: Set environment variables
Click Edit , add the following path at the end of the Variable Value box:
C:\MinGW\bin
(replace with the MinGW installation directory)Step 3: Create a C Program
<code class="c">#include <stdio.h> int main() { printf("Hello, world!\n"); return 0; }</code>
hello.c
. Step 4: Compile the program
Step 5: Run the program
<code>Hello, world!</code>
The above is the detailed content of How to run C program in notepad++. For more information, please follow other related articles on the PHP Chinese website!