How to Run C Program in Visual Studio Code on Windows 10 [ 2021 Update ]

 hi everybody I will come here to my channel today i'm dinesh how you can easily   run c program in your visual studio code

How to Run C Program in Visual Studio Code on Windows 10 [ 2021 Update ]


 so let's begin now to run c program in your visual studio   code itself you need to initially download two software one is mingw compiler and another   is visual studio code itself to download these two software let us initially go to our most loved browser   that is this chrome program itself and in the address bar essentially type mean gw distro   then enter and afterward you'll be seeing this mingw distro is fundamentally our first output so   basically click on that and you will be getting this official website of mingw distro in here if you   essentially look down a bit you will be getting this two connections one is min gw 17.1 exe and another   is mingw 17.1 without git exe so we are basically going to continue with this new pw17.1 without   git.exe so you know just snap on that and it will you know going to begin downloading our   mingw itself since I have effectively downloaded it i just you know basically drop it right so in this   way you can undoubtedly download mean gw compiler

 i will be additionally placing this connection in the description   right so presently it's an ideal opportunity to download about visual studio code itself so for that just type   visual studio code then, at that point enter and afterward you'll be seeing this code.visualstudio.com is basically   our first query item so you know simply click on visual studio code and this is going to redirect   you to this authority webpage of visual studio code in here you need to just snap on   download for windows and this component are going to begin downloading our visual studio code you   can obviously see it has you know appropriately started downloading our visual studio code so simply   drop it since I have as of now downloaded it just simply limit it and in the event that 


I essentially go to my   download catalog you can unmistakably see our mingw 17.1 without git has been now downloaded and   our another product that is this visual studio code has been likewise downloaded throughout here now   it's an ideal opportunity to introduce this two programming so first we are going to introduce mingw so for that simply need   to double tap on it and this is going to open this window in here number basically click on this   triple speck then look down a little and then just just select this neighborhood plate c then okay   then essentially click on concentrate and this will going to begin removing our primary gw compiler   so this may require a few minutes 


so what I will do is I will be coming back   subsequent to introducing our mingw no doubt so we'll come back and now as you can see our mean gw has been retro   separated so in the event that you basically go to this c drive you'll get this mingw envelope so simply   go inside that organizer and you can plainly see all records has been legitimately extricated over here   right so you know essentially go inside this bin folder then basically click on this location bar   then right snap on it and duplicate so we are basically going to duplicate this mean gw slash   container envelope area then essentially click on the search symbol and in here basically type environ   then you know basically click on this alter the system climate factors and afterward you'll be   getting the framework properties in here you'll be getting this climate factors button so just   basically click on that and afterward under this user variables just snap on way then, at that point alter then   new then right snap on it and glue so we are basically going to glue that canister organizer location   here then just snap on alright then again okay of course 


OK and presently in the event that you just simply   click on this order speedy and here in the event that you just simply type gcc space run adaptation and then   enter you can obviously see our gcc form 9.2.0 has been appropriately introduced here so all these   fundamentally mean is our mingw compiler has been rightly introduced so just drop it and now   it's an ideal opportunity to introduce our visual studio code itself so here is our visual studio code installer so   basically double tap on it to essentially start installing our visual studio code and you can   obviously see our permit understanding has been rightly shown here so essentially acknowledge this license   arrangement then just snap on straightaway and this is going to be our establishment objections keep   everything as a default and afterward basically click on next and presently it's advising that and they're   going to make this visual studio code envelope so i am good with it then essentially click on next   now it's advising that uh whether we like to create a work area easy route symbol i'd prefer to check that   and this is a vital advance you need to add to way you need to really look at this add to path  


 that is a vital significant advance right so do check that and afterward essentially click on next   and presently selling that is prepared to be installed so click on install   and you can obviously see it has you know appropriately begun introducing our   microsoft visual studio code this may take a a few minutes so the thing I will do is   i'll be returning in the wake of introducing microsoft visual studio code better believe it so we'll come back   and presently then unmistakably see our microsoft visual studio code has been in a roundabout way introduced and   our dispatch visual studio code button has also been checked so 


you know same snap on finish and this in any event, going to launch our microsoft visual studio code so as you can obviously see our microsoft visual studio code has been daintily dispatched over here   in here numbers you know basically click on file then open envelope so our open envelope window has   been now opened here you need to simply click on archives and here we are essentially going to   compose our c program right so for that let us first make an organizer itself so see we are   going to compose c program right so see rocks so just you know just select that folder   and you can plainly see our cprox organizer has been appropriately chose throughout here right now   it's an ideal opportunity to introduce a module so for that you need to just tap on this extensions   and in here number basically type c slash c in addition to in addition to and you'll get this c   cut c in addition to in addition to interface here and here you need to essentially you know just snap on install   since I have as of now introduced it is showing that uninstall so here


 it will you know show you   introduce button so you need to simply you know simply install that right and afterward you'll get this   uninstall so since I have as of now introduced i just you know just return to our explorer   and here I am going to you know essentially click on this symbol called new document so just click   on that and we should make another document called prog.c since we are composing a c program so I'm going to   you know essentially give a record augmentation as dot c then enter and you can plainly see our prog.c   record has been more right than wrong to make it here here i'm going to compose a straightforward hi world c program   so hash incorporate stdio spot h and afterward i'll i'm going to you know essentially make a principle method   so into primary and here i'm going to you know just basically print hi world hi world right   and afterward


 I additionally need to return a 0 since i created int fundamental yet see it is showing some error   in the event that you simply over stress it you can clearly see it is telling that incorporate errors   identified so this fundamentally mean is we need to set our principle gw way here so for that   just snap on handy solution and afterward just simply click on alter incorporate way settings   and this component will open this c plus plus setups window here on the off chance that you only scroll   down a bit you'll get this compiler path so here in the event that you simply click on this drop down icon   you will get this see gcc exe so just you know basic snap on that and give some an ideal opportunity to essentially introduce this and now if you return to our c program we can plainly see   the blunder is gone right so now just essentially go to document and save   so save this record then, at that point go to terminal then just you know basically click on run construct task   and afterward you need to just choose this gcc and here you can obviously see it has you   know properly began building our program that we have composed 


so it has you know appropriately finished   and here under this adventurer you can plainly see this prog.exe record has additionally been made over here   so every one of these essentially mean is our program has been you know effectively executed   now it's an ideal opportunity to run our program right and presently in the terminal on the off chance that you see it's telling that terminal   will be diffused by charge so you know simply press any key to close it so you know simply   press any key from your console and our terminal is going to be shut so presently assuming you just again go   to terminal, just you know basically make click on this new terminal and presently on the off chance that you just you know   essentially type this executable record name that is prog


 so you know just sort prog   yet before that you need to likewise set this dot cut so dab cut fundamentally mean is   we will execute this proc.exe from this folder area itself so dab cut proc then   enter and presently you can plainly see this hello world has been you know appropriately displayed in our   console so this welcome world properly shown so what are the progression you need to initially introduce this plugin   then compose a basic program so after that you you might be getting some mistake so blunder will be   coming just one time OK not terrible, but not great either for that you need to just set this configuration   compiler way here to gcc and afterward you know essentially go to terminal then just run   assemble task and after that press any key to close it then go to terminal make a new terminal   and afterward compose the executable

Post a Comment

0 Comments