For Writing C Program in Visual Studio Code you need following libraries which i will show how to download and install it
- Visual Studio Code
- MinGW
- GCC compiler
- Add Environmental Variable
Visual Studio code is great tool given by microsoft as a open Source . It is light weight Editor With Add Plugin Facility . You can writing almost any type language in it . You can add any type of plugin for any languages as you want . Even You install Typings for any Language of your like to enable intelliSense which really helps you in writing a program .
MinGM is Package Manager From here you can download many libararies and compilers for different langauges Like C,C++ ,Ada , C objective Compiler and many More
Steps to setup Visual Studio Code for C / C++
- Download MinGW from here and there will left hands Download installer Button will be there just downlod installer and Install it as you install you will get this screen
- As you get this screen click on gcc-g++ compiler you will be ask to mark as installation . Then go in the installation option above left hand side and click apply changes then click ok . All your Libraries will be downloaded in C:\MinGW folder.
- Then go to my computer right click and go to properties.
- Click On system Protection
- Click On Environment Variables
- Now Select Path in Click on Edit
- Now Click New Button and add c:\MinGw\bin folder to it and then click ok .
Congratulation now you are all set to rock for writing c program in Visual Studio Code . Open Visual Studio Code Now and Create new file name as helloworld.c . Now Press (ctrl+`) to open integrated terminal provided by visual studio code
and type
gcc helloworld.c
./a (to run program)
- Download Visual Studio Code from here
#include <stdio.h>
#include <conio.h>
int main()
{
printf("Hello World");
return 0;
}
Leave a Comment
No Comments Yet