HomeОбразованиеRelated VideosMore From: Computer Science

Run C Program in Command Prompt

213 ratings | 78453 views
Learn how to compile and run C programs in the command prompt/line without using an IDE. The commands are below. NOTE: You will need a C compiler to do this already installed, I use GCC. https://gcc.gnu.org/ Commands: gcc 'name_of_the_file' e.g. gcc hello.c gcc -o 'name_of_exe' 'name_of_file' e.g. gcc -o hello helloWorld.c Please Subscribe ! ►Become a Patreot: patreon.com/randerson112358 ►Website: http://everythingcomputerscience.com/ ►Support this channel get C-Programming Book: https://www.amazon.com/gp/product/0131103628/ref=as_li_tl?ie=UTF8&tag=everythingc06-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=0131103628&linkId=c6b8768d5fe382a757ab85da5c1686ae Resource: http://ce.uml.edu/compile.htm
Html code for embedding videos on your blog
Text Comments (26)
Bibisha Sangraula (27 days ago)
I cant see it clearly
Silverballer48 (4 months ago)
Im using TurboC, so instead of GCC what should I write?
Computer Science (3 months ago)
Hi Silverballer48, My suggestion is for you to download either Dev C++ or Code Blocks IDE. A link for how to do this is below: https://medium.com/@randerson112358/how-to-install-the-c-programming-language-on-windows-c9813f1c5abb A video on how to install Dev C++ can be found below: https://youtu.be/3llORi4KUmA
Computer Science (4 months ago)
Hhmmm... I'm not sure, I thought this was discontinued. Try installing Dev C++ instead of TurboC, the below article can help you: “How To Install The C-Programming Language On Windows” by randerson112358 https://link.medium.com/6iKKlfKcaV
nycbklynrmp (4 months ago)
should have smaller than 13 of your screen, too small to see terminal
Vlad Lopatinsky (5 months ago)
How is this helpful to any of you? I know the gcc commands if i get it to install on windows - you ovbiously skipped like a thousand steps. i hate seeing videos like this with comments saying " thanks so awesome!" when nothing is awesome just makes everything more irritating.
Computer Science (5 months ago)
@Vlad Lopatinsky , what you don't understand in this video is something that I did not explain, which is how to install a C-compiler on Windows 10. Your question to me is "do you have to install mingw g++ compiler on windows" , the short answer is yes. This video wasn't intended to be a "how to install GCC" video, it was simply showing commands that you can use on the command line to compile & run your C-Program source file. I am thankful of all of the positive comments on my channel, I think the internet needs more of that. If you do not understand something just ask, no need to be negative, remember these videos and a lot of other peoples content is out on the web for FREE . I am guessing the issue is that you are having difficulty on installing the GCC compiler and mingw (Minimalist GNU for Windows). I honestly did not think it would be difficult for anyone to install the GCC compiler with so many videos, websites, & examples on the web. This may be great to make a video on, thank you for that! If you are having difficulty most likely others are as well. If you are having trouble downloading GCC, then download Code Blocks (codeblocks-17.12mingw-setup.exe) you can find it here: http://www.codeblocks.org/downloads/binaries or download DevC++, these are IDE's (Integrated Development Environments) that will automatically download everything you need. Thanks again for the video idea, and let me know if that is the issue and if one of those two options solves your problem.
Vlad Lopatinsky (5 months ago)
@Computer Science Didn't mean to come off as rude - but correct me if I am wrong it is my understanding that you cant just install gcc its meant for linux so you have to install mingw g++ compiler on a windows machine
Computer Science (5 months ago)
Other than installing a compiler, which I have a link to that in the description, what steps did I skip? What do you not understand in the video?
wwe_ figure_bro (7 months ago)
gcc is not recognized as a command. Help!
SH4RKZ (7 months ago)
Add it to PATH variable.
Shashank Jingade (8 months ago)
Finally could run the program
Israel Obami (9 months ago)
follow on [email protected]_s.a.r.el
Chandana Inguva (9 months ago)
Very helpful video... Thank you, Sir.
Siddhant Sonwane (10 months ago)
You have to install a gcc compiler first I use this https://sourceforge.net/projects/tdm-gcc/ It easy to download and install
randerson112358 (10 months ago)
I also put a link to the compiler in the description.
Girish Kumar (1 year ago)
why it didnt create .o file?
Aryan khullar (1 year ago)
thank you very much really nice video
Computer Science (1 year ago)
Thank you !
Saif Eddine Safi (1 year ago)
Thanks man 👍👍
Hà Chí Hào (2 years ago)
'perl' is not recognized as an internal or external command, operable program or batch file. help me ! :(
basheer shamoun (1 year ago)
you need to install minGW https://sourceforge.net/projects/mingw/?source=typ_redirect
NanoCoder (1 year ago)
Lol stupid you need to install perl
Re34 (1 year ago)
same when i tape gcc :'(
TruthSearch (2 years ago)
Good video; Clearly explained, thanks.
Computer Science (2 years ago)
TruthSearch thanks for watching!

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.