- Windows OS
- Stable Internet Connection
VSCode (Visual Studio Code) is a powerful Integrated Development Environment (IDE) that offers extensive support for extensions and customization. VSCode features built-in syntax highlighting and auto-completion, which greatly enhance the understanding and writing of code in any programming language.
MinGW is a collection of open-source development tools for Windows that includes the GNU Compiler Collection(GCC) and other essential utilities from GNU softwares.
- Download vscode installer form official website, and run the installer with
administrator
permisions. - Accept the license agreement and click on
Next > Next > Install
. After Installation successfully complete click onFinish
. - Download mingw installer form sourceforge, and run the installer with
administrator
permisions. - Then click on
Install > Continue
. This will install latest version of mingw installer manager. - After installation complete click on
Continue
. MinGW installer manager will open itself, now right click onmingw32-base
form the package list and selectMark for Installaion
. - Now from menubar click on
Installation
and selectApply changes
, a prompt will pop up, selectApply
. This will install latest GNU base binaries. After Installion completes click onClose
and quit the Manager. - After Successfully installing MinGW we also need to export the directory(to the
PATH
variable) where MinGW binaries are installed. - Search for
Edit the system environment variables
, open it and click onEnvironment Variables...
and clickEdit > New
and add the location of binaries where you you installed MinGW, which in our case is default toC:\MinGW\bin
. After adding clickOK > OK > OK
. - VsCode and MinGw is Successfully installed on your systems.
- C/C++ Extension Pack
- Code Runner
Click on Setting(or CTR+,) form left bottom bar and select Settings > Extensions > Run Code Configuration
and serach for Run in Terminal
and enable it. This will run your code in linux like terminal which will give you more control over your vscode.
Writing Hello world in C
Copy the following code into the vscode editor and save it.
#include <stido.h>
int main(){
printf("Hello, World!\n");
return 0;
}
Now click on Run button, placed on Top-Right corner of tab bar. Your Program will run and will output "Hello, World!" onto terminal tab.