How to Build / Compile and Run a C Program in Command Prompt ( cmd ) on Windows 10

  Рет қаралды 272,657

LearningLad

LearningLad

5 жыл бұрын

in this video tutorial you will learn How to compile/ build and run a C language Program in command prompt on windows 10 operating System.
skip to start Writing code 04:57
After installing C toolset ( mingw oin windows is used here ) we need to set the path environment variable.
After that we need to open the command prompt and use the command
gcc program.c
this will generate the executable from the program.
we can use a.out and run the program.
We can also give name for the executable generated by using
gcc -o program.exe program.c
Learn about
Toolset Toolchain Ide's
• Tool set, Tool chain a...
Installing Mingw
• MinGW Compiler Suite I...
Installing CodeBlocks ide
• Installing CodeBlocks ...
Watch Video tutorials in HINDI at
/ learningladhindi
#CProgramming #LearningLad
Catch us on Social Media
facebook / learninglad
twitter / learningladedu
Google+ www.google.com/+LearningLad

Пікірлер: 231
@laurentiutrifan9092
@laurentiutrifan9092 4 жыл бұрын
Thank you for the patience and the simple but efficient explanations.
@alexschmidt4427
@alexschmidt4427 5 жыл бұрын
This is very powerful actually I am going to practice doing that all the time on cmd. Thanks for every new awesome feature that you provide
@LearningLad
@LearningLad 5 жыл бұрын
my pleasure. keep learning :)
@andyrodriguez2660
@andyrodriguez2660 4 жыл бұрын
I have been trying to do this for days but all other tutorials were not good enough. Thank you.
@andylunatic3174
@andylunatic3174 2 жыл бұрын
Thank you so much! Finally I found this video. I'm learning the C programming in the university but nobody explaind how I can create .exe from my .c. But now everything works perfectly. You are amazing!
@LearningLad
@LearningLad 2 жыл бұрын
You're very welcome!
@captain_shrug
@captain_shrug 4 жыл бұрын
ah, finaly someone showing me why my WinGW was not found. Thank you very much :)
@LearningLad
@LearningLad 4 жыл бұрын
Glad I could help!
@hideakipage8151
@hideakipage8151 3 жыл бұрын
Clear, simple and direct. Many thanks.
@LearningLad
@LearningLad 3 жыл бұрын
You're welcome!
@alexschmidt4427
@alexschmidt4427 5 жыл бұрын
Their is a lot of tutorials on KZbin about programming in general but none of them (at least for my watching and searching) have explained how to deal with the Installer tool of your own program.
@godrexer7641
@godrexer7641 2 жыл бұрын
the video has been created so simply yet so complete in details...thank you...keep it up
@charlesjsescoto
@charlesjsescoto 3 жыл бұрын
You are the only one i see on youtube explain how to do this and how this is works, ty for that
@sanjeevmaharjan9795
@sanjeevmaharjan9795 4 жыл бұрын
thank you so much you explained it in great detail.
@LearningLad
@LearningLad 4 жыл бұрын
my pleasure keep learning :)
@peacefirst4884
@peacefirst4884 3 жыл бұрын
Thank u 💕.. After watching so many videos I reached here and this is the only one worked
@LearningLad
@LearningLad 3 жыл бұрын
Most welcome 😊
@ProfreshionalLifeBeyond
@ProfreshionalLifeBeyond 2 жыл бұрын
Thank you very much, Anil. Your instruction was thorough and easy to follow. I have not been coding for sometime yet I managed to get all the way through. Best wishes from Melbourne Australia, Minh
@LearningLad
@LearningLad 2 жыл бұрын
You are most welcome
@ProfreshionalLifeBeyond
@ProfreshionalLifeBeyond 2 жыл бұрын
@@LearningLad All the best with all that you do. May you and your loved ones stay safe during this virus season.
@roshan6362
@roshan6362 4 жыл бұрын
This is exactly what I wanted thank you so much bro
@LearningLad
@LearningLad 4 жыл бұрын
pleasure keep learning :)
@soroushfathi5537
@soroushfathi5537 3 жыл бұрын
exactly
@Gyanmarg
@Gyanmarg 2 жыл бұрын
why
@taherahmed7398
@taherahmed7398 3 жыл бұрын
Awesome. You did a great job Man. Thank you so much
@LearningLad
@LearningLad 3 жыл бұрын
Pleasure :)
@soroushfathi5537
@soroushfathi5537 3 жыл бұрын
thank you so much, finally, i run the c program in cmd with your tutorial, 👍🙋‍♂️
@LearningLad
@LearningLad 3 жыл бұрын
Awesome Keep learning :)
@soroushfathi5537
@soroushfathi5537 3 жыл бұрын
@@LearningLad sure bro
@doly099
@doly099 2 жыл бұрын
Thanks a lot❤️❤️ i'm very much grateful to you for this tutorial
@ayan6871
@ayan6871 3 жыл бұрын
Finally I understood..thank u so much 😊
@LearningLad
@LearningLad 3 жыл бұрын
Most welcome 😊
@Karan_repo
@Karan_repo 3 жыл бұрын
loved the video great explanation . Thank you
@LearningLad
@LearningLad 3 жыл бұрын
You are welcome!
@Muskan-hn8ib
@Muskan-hn8ib 2 жыл бұрын
after watching many videos on you tube this is the only video who explain it in proper way well don sir..
@LearningLad
@LearningLad 2 жыл бұрын
Pleasure
@niteshmodi5468
@niteshmodi5468 2 жыл бұрын
Thank you bro. Nice explanation.
@Umapriya.
@Umapriya. 3 жыл бұрын
Thank you so much this video helped me a lot.
@LearningLad
@LearningLad 3 жыл бұрын
Glad it helped!
@matsaramachandrarao2746
@matsaramachandrarao2746 2 жыл бұрын
Thanks bro, this video is very useful for beginners like me.
@zxnnightstalker2289
@zxnnightstalker2289 3 жыл бұрын
This is where my journey on C/C++ starts.
@LearningLad
@LearningLad 3 жыл бұрын
All the best :)
@fabi___n5277
@fabi___n5277 2 жыл бұрын
How has your journey been so far?
@zxnnightstalker2289
@zxnnightstalker2289 2 жыл бұрын
@@fabi___n5277 I am in C++ Metaprogramming. I think I am intermediate. But at the same time I have to get the job, so I am mostly doing android Development. But in C++, I can work with type traits and STLs.
@jmccm7739
@jmccm7739 4 жыл бұрын
thank you man,i really didn't wanna mess with dual booting linux and windows
@LearningLad
@LearningLad 4 жыл бұрын
my pleasure. dual booting is not that hard
@batmanjpeg
@batmanjpeg 4 жыл бұрын
Hackerman
@riturani2489
@riturani2489 2 жыл бұрын
Thanks a lot sir. You know what I'm so happy. Maine kitne hi videos dekhe the but ye ho nhi paya Maine finally apne semester ke last din ye dikha and i did it. Thanku so much🙏🙏
@LearningLad
@LearningLad 2 жыл бұрын
most welcome :)
@samdavepollard
@samdavepollard 3 жыл бұрын
Good one. Many Thanks for sharing your knowledge.
@LearningLad
@LearningLad 3 жыл бұрын
My pleasure
@GaddamTejendra
@GaddamTejendra 3 жыл бұрын
Thanks bro,the video uploaded an year ago.but it still helps many
@LearningLad
@LearningLad 3 жыл бұрын
Glad it helped
@mudangkano5267
@mudangkano5267 2 жыл бұрын
It was very useful for me. You r better than other youtubers
@LearningLad
@LearningLad 2 жыл бұрын
Thanks a lot 😊
@CSERaginiGupta-vc8hd
@CSERaginiGupta-vc8hd 2 жыл бұрын
Thank-you so much I got fom beginning to the end all info
@LearningLad
@LearningLad 2 жыл бұрын
Pleasure
@surajkumar-yn1ty
@surajkumar-yn1ty 2 жыл бұрын
thnks man. i was able to install and run my first program in one go. t
@LearningLad
@LearningLad 2 жыл бұрын
Pleasure
@nilkamalwaghamare4583
@nilkamalwaghamare4583 2 жыл бұрын
this video is very helpful to me....nice work keep doing it.....best of luck
@LearningLad
@LearningLad 2 жыл бұрын
Thank you, I will :)
@nighilenthbb6338
@nighilenthbb6338 3 жыл бұрын
Thank you so much bro I was not able to set the path 🙏🙏
@LearningLad
@LearningLad 3 жыл бұрын
Welcome 👍
@Alpha-uw6wn
@Alpha-uw6wn 3 жыл бұрын
I am learning with ur videos... Than k u🥰
@LearningLad
@LearningLad 3 жыл бұрын
My pleasure 😊
@thulanitinashe6475
@thulanitinashe6475 4 жыл бұрын
on the last part when we change the name of the a.exe when i did it another a file was developed hello.exe but not replaced it. Is it the name same thing?
@MK-pu6xj
@MK-pu6xj 6 ай бұрын
your explanation was very helpful🤩
@LearningLad
@LearningLad 6 ай бұрын
Glad it was helpful!
@adarshsingh1420
@adarshsingh1420 4 жыл бұрын
Thanks buddy It helped me a lot ;-)
@LearningLad
@LearningLad 4 жыл бұрын
Glad it helped
@Deepak-bk3lz
@Deepak-bk3lz 2 жыл бұрын
@@LearningLad Not able to work ..need more help
@smileySmit
@smileySmit 2 жыл бұрын
thank you video is really helpful
@LearningLad
@LearningLad 2 жыл бұрын
You're welcome!
@mdshafiulalam2287
@mdshafiulalam2287 2 жыл бұрын
It helps me . Thank you
@LearningLad
@LearningLad 2 жыл бұрын
My Pleasure :)
@FEETOFKEELEY
@FEETOFKEELEY 2 жыл бұрын
Thanks a lot. 👍🏻👍🏻 Extremely helpful. Compiling with MinGW becomes lot easiier now. Please make a video on compiling both C and C++ programs with Clang compiler on Windows.
@LearningLad
@LearningLad 2 жыл бұрын
Noted
@angaming2428
@angaming2428 2 жыл бұрын
soon
@mechguy0404
@mechguy0404 3 жыл бұрын
thanks for making this video...
@LearningLad
@LearningLad 3 жыл бұрын
It's my pleasure
@_t.anu._.1864
@_t.anu._.1864 2 жыл бұрын
Informative one.. Ty
@LearningLad
@LearningLad 2 жыл бұрын
most welcome :)
@nokashich
@nokashich 3 жыл бұрын
1st four days nobody likes college days then ul start loving it
@minhphunguyen4472
@minhphunguyen4472 2 жыл бұрын
Hey, as I can see in some other videos, they have a line "Execution time: " everytime they run the ".exe" file, do you know how to display that line ? thanks mate!
@LearningLad
@LearningLad 2 жыл бұрын
I think that depends on the idea/ toolset they are using I think codeblocks ide displays that info
@dracula3387
@dracula3387 3 жыл бұрын
thanks lad u helped me
@LearningLad
@LearningLad 3 жыл бұрын
Glad I could help
@oudomchem5133
@oudomchem5133 4 жыл бұрын
Thank you sir.
@LearningLad
@LearningLad 4 жыл бұрын
my pleasure :)
@AmineOnline
@AmineOnline 3 жыл бұрын
Realy realy helpfull and joyfull!
@LearningLad
@LearningLad 3 жыл бұрын
Glad it was helpful!
@000hugohew
@000hugohew 3 жыл бұрын
Hi may I know how client (Win 10) can execute the application by using the CLI run the apps in failover cluster (server) thank you.
@CG-yw3eq
@CG-yw3eq 3 жыл бұрын
In previous video "How to install CodeBlocks....", you saved used user variable environment to save the path. In this tutorial, the system variable is used. Is there a difference?
@djstudio759
@djstudio759 Жыл бұрын
Thnx ❤️
@getptv8356
@getptv8356 5 жыл бұрын
thanks very much!!!!!!!
@LearningLad
@LearningLad 5 жыл бұрын
my pleasure. keep learning :)
@lawo4443
@lawo4443 3 жыл бұрын
Thank you man 🖤✌️
@LearningLad
@LearningLad 3 жыл бұрын
You're welcome 😊
@muralidhar394
@muralidhar394 4 жыл бұрын
Thanks a lot bro
@LearningLad
@LearningLad 4 жыл бұрын
my pleasure :)
@madhurigaikwad6274
@madhurigaikwad6274 3 жыл бұрын
This video is a life saver
@LearningLad
@LearningLad 3 жыл бұрын
Glad this video helped you :)
@yourlinuxguy
@yourlinuxguy 2 жыл бұрын
Keep it up, Guys you can do this.
@jkrowlingsslave
@jkrowlingsslave 3 жыл бұрын
Thank you!
@LearningLad
@LearningLad 3 жыл бұрын
You're welcome!
@sjjayaswal7621
@sjjayaswal7621 2 жыл бұрын
Good information 👍
@nokashich
@nokashich 3 жыл бұрын
bloody awsum if I'm finding programming books
@satyabratbarik204
@satyabratbarik204 Жыл бұрын
It works Thank you
@LearningLad
@LearningLad Жыл бұрын
Welcome 👍
@jimmymesa
@jimmymesa 5 жыл бұрын
Good one. Not very complicated.
@LearningLad
@LearningLad 5 жыл бұрын
thank you :)
@dipaligode6962
@dipaligode6962 2 жыл бұрын
Thank you 😊
@LearningLad
@LearningLad 2 жыл бұрын
You're welcome 😊
@joyrainbowdress
@joyrainbowdress 2 жыл бұрын
Thank you so much
@LearningLad
@LearningLad 2 жыл бұрын
Pleasure
@rachanabubna7172
@rachanabubna7172 4 жыл бұрын
Can you please help me.. I am not able to do file handling using command prompt.. It's showing some absurd error for fputs function
@alinanaqvi1340
@alinanaqvi1340 2 жыл бұрын
Your videos have been so helpful. I was going out of my mind trying to download a compiler for C because our teacher tells us not to use vs studio, but your videos have made it so clear, thanks so much.
@LearningLad
@LearningLad 2 жыл бұрын
Glad it was helpful!
@Hafizislam177
@Hafizislam177 3 жыл бұрын
love you bro
@oasacademy1771
@oasacademy1771 2 жыл бұрын
thanks Anil bhai
@LearningLad
@LearningLad 2 жыл бұрын
Pleasure
@ParadoxPRIMITIVE
@ParadoxPRIMITIVE 2 жыл бұрын
thanks so much!
@LearningLad
@LearningLad 2 жыл бұрын
You're welcome!
@bharatibansode5871
@bharatibansode5871 2 жыл бұрын
Nice exlplatnation
@ravd2379
@ravd2379 2 жыл бұрын
thank so much man that helped alot f.m its allways those indian dudes
@Zaza_7
@Zaza_7 2 жыл бұрын
If you don't like the video hit the dislike button hurt me.... Great video you have explained me the thing which took my teacher 2 hours. KZbin is indeed our 2nd tchr shoutout to every1 out there.
@LearningLad
@LearningLad 2 жыл бұрын
🙏
@ayushimishra3032
@ayushimishra3032 4 жыл бұрын
Can you please tell me how to run a c project source code .I have the SourecCode of the project but i dont know how to run it please do tell !!!
@sonammalik17
@sonammalik17 2 жыл бұрын
Osm bro u made my day
@LearningLad
@LearningLad 2 жыл бұрын
Pleasure
@tjmozdzen
@tjmozdzen 3 жыл бұрын
Very nice!
@LearningLad
@LearningLad 3 жыл бұрын
Thank you :)
@payalsagar1808
@payalsagar1808 3 жыл бұрын
Wow thanks a lot:)
@LearningLad
@LearningLad 3 жыл бұрын
Welcome :)
@arijeetsingh9444
@arijeetsingh9444 3 жыл бұрын
Thanks.
@LearningLad
@LearningLad 3 жыл бұрын
You're welcome
@priyeshpramanik6411
@priyeshpramanik6411 3 жыл бұрын
Thanx for you help
@LearningLad
@LearningLad 3 жыл бұрын
It's my pleasure
@ohmyfoodies2753
@ohmyfoodies2753 3 жыл бұрын
Tysm❤
@LearningLad
@LearningLad 3 жыл бұрын
pleasure :)
@prasadghodake3169
@prasadghodake3169 2 жыл бұрын
Thanks
@LearningLad
@LearningLad 2 жыл бұрын
Welcome
@melkenhoning158
@melkenhoning158 3 жыл бұрын
Who ever decided that Windows doesn't need a built-in compiler because "no one would use it" deserves a firm kick in the balls
@yuli3873
@yuli3873 2 жыл бұрын
Windows doesn't need Python or C built in, but Spotify and Candy Crush instead /s
@woonsuanloo5560
@woonsuanloo5560 4 жыл бұрын
After I hit enter after I typed 'a' into the cmd, I got the message 'Access is denied.'. Would you know how to solve this error?
@sauravpatwardhan8765
@sauravpatwardhan8765 3 жыл бұрын
this is an issue related to your Antivirus software. it always happens on my pc too. You need to switch off real time scanning while running your newly created program. Turn it back on after you are done. The antivirus doesn't allow you to run it because the source is new and unknown.. so to be safe you are denied access. Hope it helps
@rajarshi25.7
@rajarshi25.7 2 жыл бұрын
thanks
@LearningLad
@LearningLad 2 жыл бұрын
Pleasure
@dionjohnson4655
@dionjohnson4655 3 жыл бұрын
great thanks it works but still showing an error on my code as int a problem how to solve them when I compile them using online dgb it completes fully without any error so please find a solution for that also.
@LearningLad
@LearningLad 3 жыл бұрын
i don't really get your problem. check whether in your code, you have declared some variables and haven't used them
@shuaidea
@shuaidea 3 жыл бұрын
thank u
@LearningLad
@LearningLad 3 жыл бұрын
Welcome
@brianmuhia2955
@brianmuhia2955 3 жыл бұрын
great video
@LearningLad
@LearningLad 3 жыл бұрын
Thank you :)
@goedeck1
@goedeck1 Жыл бұрын
thank you
@LearningLad
@LearningLad Жыл бұрын
You're welcome
@goedeck1
@goedeck1 Жыл бұрын
I had codeblocks already so I was very happy seeing my version when I typed gcc --version!
@play7.017
@play7.017 2 жыл бұрын
thnx bro
@LearningLad
@LearningLad 2 жыл бұрын
pleasure :)
@anthonymarquez2542
@anthonymarquez2542 3 жыл бұрын
great vid
@LearningLad
@LearningLad 3 жыл бұрын
thank you :)
@szalaiandras9103
@szalaiandras9103 Жыл бұрын
In Bash, you have to add './' before the executable to be able to run it, like: ./a.exe.
@LearningLad
@LearningLad Жыл бұрын
yes
@shrinidhikulkarni2231
@shrinidhikulkarni2231 4 жыл бұрын
its not working in my pc its returning access is denied can u say wats the problem in this case
@yashbitla4603
@yashbitla4603 4 жыл бұрын
Did you get a solution for this? I'm getting the same error
@Wan_Destroyer
@Wan_Destroyer 2 жыл бұрын
It not turn to a exe it Show me do my folder or locations and at the end collect2.exe error id returned 1 exit status ?? Help
@shalenmathew980
@shalenmathew980 2 жыл бұрын
God bless you
@LearningLad
@LearningLad 2 жыл бұрын
thank you :)
@dichithareddyreddy5035
@dichithareddyreddy5035 2 жыл бұрын
I am unable to run the code which has to take input from the user .It is displaying "Access is denied." can you please look into that .for me hello world program is working.
@alexschmidt4427
@alexschmidt4427 5 жыл бұрын
Hello Anil how are you beside KZbin? I'm wondering if you can teach us how to make a C++ program that runs automatically when Windows starts. This thing is unique as well as your videos and is very important. As an example for that is the Discord desktop application. When you install discord on your desktop, every time you turn your computer on, your default browser will always open Discord's main page automatically. Hope I was clear enough. XD Thank you for your time .
@LearningLad
@LearningLad 5 жыл бұрын
first create the program to do your intended task. place it in windows start up That's it
@alexschmidt4427
@alexschmidt4427 5 жыл бұрын
@@LearningLad Ofcource but if I uploaded my program to let others download it, how would they have the program opened each time windows restarts. They only should install the program and the rest is for the installer. So my question here is: "How do we make our installer to automatically add the executable to the startup menu?" Thank you again
@sheetalpandey8299
@sheetalpandey8299 5 жыл бұрын
Happy holi sir
@LearningLad
@LearningLad 5 жыл бұрын
happy holi
@AmitGupta-yw2wg
@AmitGupta-yw2wg 2 жыл бұрын
My c++ program shows error while running on command promt but when I run on code editor it works fine
@sarthakghule7
@sarthakghule7 3 жыл бұрын
I can't compile the code since the file is saved in D drive. What can I do?
@nani.official45
@nani.official45 3 жыл бұрын
When typing gcc (file name) Showing error message like no such file or directory Fatal error: no input files & Compilation terminated
@pritesh_2564u
@pritesh_2564u 2 жыл бұрын
Can we use microsoft word to write our c code ?
@FaizanKhan-pu5fh
@FaizanKhan-pu5fh 4 жыл бұрын
hi it giving output from printf command but it does not print the value stored in a variable
@LearningLad
@LearningLad 4 жыл бұрын
paste your code here
@ebrimasaho7978
@ebrimasaho7978 5 жыл бұрын
the lectures are arranged sequentially
@LearningLad
@LearningLad 5 жыл бұрын
yes they are :)
@bewiings
@bewiings 2 жыл бұрын
Whenever i execute a program it shows codeblocks process returned 0(0x0).execution time 0.39 second can you help me with this ? :') and not to mention this video was very helpful for a beginner like me .
Variables Declaration and Usage in C Programming | Video Tutorial
4:43
Writing Code That Runs FAST on a GPU
15:32
Low Level Learning
Рет қаралды 542 М.
Каха ограбил банк
01:00
К-Media
Рет қаралды 10 МЛН
Super gymnastics 😍🫣
00:15
Lexa_Merin
Рет қаралды 107 МЛН
World’s Deadliest Obstacle Course!
28:25
MrBeast
Рет қаралды 132 МЛН
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 137 МЛН
How to Compile and Run a C++ Program from Command Prompt in Windows 11
12:50
ProgrammingKnowledge2
Рет қаралды 4,4 М.
Command Prompt Basics: How to use CMD
18:41
Space Dodo
Рет қаралды 131 М.
Windows PowerShell/Command Line for Beginners (Tutorial)
15:23
CyberForge
Рет қаралды 84 М.
How to Run C and C++ Programs on VS code?
8:35
Mr About Tech
Рет қаралды 694 М.
why do header files even exist?
10:53
Low Level Learning
Рет қаралды 370 М.
How do computers read code?
12:01
Frame of Essence
Рет қаралды 3 МЛН
Pointers in C for Absolute Beginners - Full Course
2:04:29
freeCodeCamp.org
Рет қаралды 205 М.
Каха ограбил банк
01:00
К-Media
Рет қаралды 10 МЛН