hello guys so in this video I want to
show you guys how to run AC program in
the command prompt also known as the
command line so here I have my C program
the source code and I'm calling it hello
world C and I save this program on my
desktop here so what we're going to do
is we first need to open up the command
prompt and then we need to change our
directory to where our source code is so
right now I have this on the desktop so
I'm going to change the directory to the
desktop and now what we're going to do
is we're going to run this command call
it GCC the C compiler space and then the
name of the file which is hello world
dot C and then what's going to happen is
it's going to create is going to compile
the source code and create an executable
file onto the desktop now remember we
have not given the name of the
executable so it's going to
automatically create a name for this
executable file so I'm go ahead and
press ENTER and you can see the
executable here is named a exe and so
now I'm motor for us to run the hello
world dot C program all to do is call
that a program so I'm just going to put
a here press ENTER and we can see that
it prints all over to the console
alright so I'm going to delete this file
because maybe you want to give the file
a name when you actually compile it so
in order to do that we're going to do it
a slightly different command is GCC and
then space - o space the name of the
file that we're going to call it this
executable file someone call it hello
and then space we need the name of the
source code which is hello world dot C
and press Enter
alright and now we see a compiled hello
world called hello on the desktop which
is exactly what we named it here and the
same thing in order to run it all to do
is type hello
the name of the executable file press
ENTER and we can see again that it
prints 2d console so thank you guys I
hope you really enjoyed this video
please leave likes comments please
subscribe become a supporter on patreon
and I see you guys on the next video