How to Build / Compile and Run a C Program in Command Prompt ( cmd ) on Windows 10
Вставка
- Опубліковано 10 жов 2024
- 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/...
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!
You're very welcome!
I have been trying to do this for days but all other tutorials were not good enough. Thank you.
after watching many videos on you tube this is the only video who explain it in proper way well don sir..
Pleasure
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
my pleasure.
keep learning :)
Their is a lot of tutorials on UA-cam 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.
ah, finaly someone showing me why my WinGW was not found. Thank you very much :)
Glad I could help!
Thank u 💕.. After watching so many videos I reached here and this is the only one worked
Most welcome 😊
Thank you for the patience and the simple but efficient explanations.
thank you so much, finally, i run the c program in cmd with your tutorial, 👍🙋♂️
Awesome
Keep learning :)
@@LearningLad sure bro
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🙏🙏
most welcome :)
thank you man,i really didn't wanna mess with dual booting linux and windows
my pleasure.
dual booting is not that hard
Hackerman
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
You are most welcome
@@LearningLad All the best with all that you do. May you and your loved ones stay safe during this virus season.
Thanks bro,the video uploaded an year ago.but it still helps many
Glad it helped
I am learning with ur videos... Than k u🥰
My pleasure 😊
You are the only one i see on youtube explain how to do this and how this is works, ty for that
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.
Noted
soon
It was very useful for me.
You r better than other youtubers
Thanks a lot 😊
this video is very helpful to me....nice work keep doing it.....best of luck
Thank you, I will :)
Thank you so much bro
I was not able to set the path
🙏🙏
Welcome 👍
your explanation was very helpful🤩
Glad it was helpful!
This is where my journey on C/C++ starts.
All the best :)
How has your journey been so far?
@@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.
thnks man. i was able to install and run my first program in one go. t
Pleasure
the video has been created so simply yet so complete in details...thank you...keep it up
You're a livesaver. Thanks man
Glad my video helped you
This is exactly what I wanted thank you so much bro
pleasure
keep learning :)
exactly
why
Good one.
Many Thanks for sharing your knowledge.
My pleasure
thank you so much you explained it in great detail.
my pleasure
keep learning :)
1st four days nobody likes college days then ul start loving it
Clear, simple and direct. Many thanks.
You're welcome!
Thank you man 🖤✌️
You're welcome 😊
Finally I understood..thank u so much 😊
Most welcome 😊
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?
Realy realy helpfull and joyfull!
Glad it was helpful!
thanks Anil bhai
Pleasure
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.
UA-cam is indeed our 2nd tchr shoutout to every1 out there.
🙏
Thank you so much this video helped me a lot.
Glad it helped!
thanks for making this video...
It's my pleasure
thank you video is really helpful
You're welcome!
Thank you sir.
my pleasure :)
loved the video great explanation . Thank you
You are welcome!
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
Windows doesn't need Python or C built in, but Spotify and Candy Crush instead /s
Informative one.. Ty
most welcome :)
Good one. Not very complicated.
thank you :)
Thanks bro, this video is very useful for beginners like me.
This video is a life saver
Glad this video helped you :)
Thank you 😊
You're welcome 😊
thanks lad u helped me
Glad I could help
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.
i don't really get your problem.
check whether in your code, you have declared some variables and haven't used them
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.
Glad it was helpful!
bloody awsum if I'm finding programming books
Awesome. You did a great job Man. Thank you so much
Pleasure :)
Thank-you so much
I got fom beginning to the end all info
Pleasure
Thanks buddy It helped me a lot ;-)
Glad it helped
@@LearningLad Not able to work ..need more help
It works
Thank you
Welcome 👍
Keep it up, Guys you can do this.
Good information 👍
Thank you!
You're welcome!
Thank you bro. Nice explanation.
the lectures are arranged sequentially
yes they are :)
Osm bro u made my day
Pleasure
Thanks a lot bro
my pleasure :)
Thanks
Welcome
Thanx for you help
It's my pleasure
Very nice!
Thank you :)
Thanks.
You're welcome
Thnx ❤️
When typing gcc (file name)
Showing error message like no such file or directory
Fatal error: no input files &
Compilation terminated
its not working in my pc its returning access is denied can u say wats the problem in this case
Did you get a solution for this? I'm getting the same error
great video
Thank you :)
Tysm❤
pleasure :)
thank you
You're welcome
I had codeblocks already so I was very happy seeing my version when I typed gcc --version!
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
OMG THANK YOU!!!!
I spent a week trying to figure out why mine was not working. I am using the book: « Learn C programming » by Jeff Szuhay. I used g++ instead of gcc since in the book, we were supposed to use cc instead. Anyways! I definitely need to understand the logic behind all of this in order to make sense of what I am doing.
In this short video, I was able to learn a lot about the simple hello work language, why we use the symbols that we use, etc.. I will look for more details, because I like to understand the « why » if everything that I do.
Your video was very useful! Thank you so much!
pleasure
keep learning :)
Thanks a lot❤️❤️ i'm very much grateful to you for this tutorial
Hello Anil how are you beside UA-cam?
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 .
first create the program to do your intended task.
place it in windows start up
That's it
@@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
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 !!!
thnx bro
pleasure :)
Nice exlplatnation
thanks very much!!!!!!!
my pleasure.
keep learning :)
Happy holi sir
happy holi
thank u
Welcome
great vid
thank you :)
God bless you
thank you :)
love you bro
thanks so much!
You're welcome!
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 .
thank so much man that helped alot
f.m its allways those indian dudes
I didn't get "a.exe" instead I got "a" only, how do I fix that?? Please let me know how to fix it and thank u for the video
that's ok
i think in your system displaying file extension option is disabled
so you see only 'a'
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!
I think that depends on the idea/ toolset they are using
I think codeblocks ide displays that info
Wow thanks a lot:)
Welcome :)
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?
Can't we change the code while we once run thee code on cmd??(when cmd is working)
of course you can.
Can we use microsoft word to write our c code ?
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.
Sir while typing gcc hello world.c it shows fatal error. Pls tell for this sir pls
if your file name contains space then write it between double quotes
gcc "hello world.c"
Can you add how to open a programs help system🤔
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?
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
I Am Not Getting The result ,Instead I am getting access denied . plz reply me
Run cmd as admin
Thks bro it is working
what does dir mean and why u type dir ?
plz response
dir command displays the content of the current directory - that means all the subfolders, files and details about them. It's a way to check your files and - more important - the file exact name before typing in command line.
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.