Installing VSC

Firstly you need to install vscode. For downloading vs code, you need to go to official website of the visual studio code.

Then just accept the licence agreement and install it.

Installing Mingw

Then you have to download a C or C++ compiler that can execute the programs.VSC recommends to download Mingw compiler.

To download it just click on this link and choose your window version

 

 

Mingw Setup

Then kindly install it in your computer, it might take some time for downloading and installing it. Then go to your C folder (Windows boot folder),There, then you will find a folder named Mingw.

Click it and go the folder named bin.

Then copy the file path and open search environment variables in search bar and open it.

Then go to environment variables,click on path and choose the option of edit.

There you will see an option that is new, simply click on it and paste the path location of the bin.

Then save it.

VSC Setup

Then go to VSC ,and in settings, search for some extensions C/C++ whatever comes at top from Microsoft just download it.

And also download the extension Code runner.

Then write your C or C++ code

And in the left-up corner you can see one option like play button just click it's beside down arrow and you can choose the option to debug or run.

From here you can simply save the option and you able to run the program.