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

Поделиться
HTML-код
  • Опубликовано: 18 сен 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/...

Комментарии • 231

  • @andylunatic3174
    @andylunatic3174 2 года назад +4

    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!

  • @alexschmidt4427
    @alexschmidt4427 5 лет назад +16

    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 лет назад +4

      my pleasure.
      keep learning :)

  • @captain_shrug
    @captain_shrug 4 года назад +23

    ah, finaly someone showing me why my WinGW was not found. Thank you very much :)

  • @andyrodriguez2660
    @andyrodriguez2660 5 лет назад +4

    I have been trying to do this for days but all other tutorials were not good enough. Thank you.

  • @laurentiutrifan9092
    @laurentiutrifan9092 4 года назад +8

    Thank you for the patience and the simple but efficient explanations.

  • @peacefirst4884
    @peacefirst4884 3 года назад +4

    Thank u 💕.. After watching so many videos I reached here and this is the only one worked

  • @alexschmidt4427
    @alexschmidt4427 5 лет назад +20

    Their is a lot of tutorials on RUclips 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.

  • @Muskan-hn8ib
    @Muskan-hn8ib 3 года назад +1

    after watching many videos on you tube this is the only video who explain it in proper way well don sir..

  • @soroushfathi5537
    @soroushfathi5537 3 года назад +3

    thank you so much, finally, i run the c program in cmd with your tutorial, 👍🙋‍♂️

  • @Alpha-uw6wn
    @Alpha-uw6wn 3 года назад +2

    I am learning with ur videos... Than k u🥰

  • @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🙏🙏

  • @nighilenthbb6338
    @nighilenthbb6338 3 года назад +2

    Thank you so much bro
    I was not able to set the path
    🙏🙏

  • @MinatoKushinalovers
    @MinatoKushinalovers День назад +1

    You're a livesaver. Thanks man

  • @nilkamalwaghamare4583
    @nilkamalwaghamare4583 2 года назад +1

    this video is very helpful to me....nice work keep doing it.....best of luck

  • @jmccm7739
    @jmccm7739 4 года назад +3

    thank you man,i really didn't wanna mess with dual booting linux and windows

    • @LearningLad
      @LearningLad  4 года назад +3

      my pleasure.
      dual booting is not that hard

    • @batmanjpeg
      @batmanjpeg 4 года назад +1

      Hackerman

  • @GaddamTejendra
    @GaddamTejendra 3 года назад +2

    Thanks bro,the video uploaded an year ago.but it still helps many

  • @ProfreshionalLifeBeyond
    @ProfreshionalLifeBeyond 3 года назад +7

    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  3 года назад +1

      You are most welcome

    • @ProfreshionalLifeBeyond
      @ProfreshionalLifeBeyond 3 года назад

      @@LearningLad All the best with all that you do. May you and your loved ones stay safe during this virus season.

  • @AmineOnline
    @AmineOnline 3 года назад +2

    Realy realy helpfull and joyfull!

  • @mudangkano5267
    @mudangkano5267 2 года назад +1

    It was very useful for me.
    You r better than other youtubers

  • @zxnnightstalker2289
    @zxnnightstalker2289 3 года назад +20

    This is where my journey on C/C++ starts.

    • @LearningLad
      @LearningLad  3 года назад +4

      All the best :)

    • @fabi___n5277
      @fabi___n5277 2 года назад

      How has your journey been so far?

    • @zxnnightstalker2289
      @zxnnightstalker2289 2 года назад +1

      @@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.

  • @MK-pu6xj
    @MK-pu6xj 9 месяцев назад +2

    your explanation was very helpful🤩

  • @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

  • @lawo4443
    @lawo4443 3 года назад +2

    Thank you man 🖤✌️

  • @sanjeevmaharjan9795
    @sanjeevmaharjan9795 5 лет назад +6

    thank you so much you explained it in great detail.

  • @roshan6362
    @roshan6362 4 года назад +10

    This is exactly what I wanted thank you so much bro

  • @surajkumar-yn1ty
    @surajkumar-yn1ty 2 года назад +1

    thnks man. i was able to install and run my first program in one go. t

  • @hideakipage8151
    @hideakipage8151 3 года назад +2

    Clear, simple and direct. Many thanks.

  • @samdavepollard
    @samdavepollard 3 года назад +2

    Good one.
    Many Thanks for sharing your knowledge.

  • @Zaza_7
    @Zaza_7 2 года назад +1

    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.
    RUclips is indeed our 2nd tchr shoutout to every1 out there.

  • @FEETOFKEELEY
    @FEETOFKEELEY 2 года назад +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.

  • @godrexer7641
    @godrexer7641 2 года назад

    the video has been created so simply yet so complete in details...thank you...keep it up

  • @ayan6871
    @ayan6871 3 года назад +2

    Finally I understood..thank u so much 😊

  • @Umapriya.
    @Umapriya. 3 года назад +2

    Thank you so much this video helped me a lot.

  • @nokashich
    @nokashich 3 года назад +1

    1st four days nobody likes college days then ul start loving it

  • @Karan_repo
    @Karan_repo 4 года назад +2

    loved the video great explanation . Thank you

  • @melkenhoning158
    @melkenhoning158 4 года назад +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 3 года назад +1

      Windows doesn't need Python or C built in, but Spotify and Candy Crush instead /s

  • @taherahmed7398
    @taherahmed7398 3 года назад +2

    Awesome. You did a great job Man. Thank you so much

  • @oasacademy1771
    @oasacademy1771 2 года назад +1

    thanks Anil bhai

  • @mdshafiulalam2287
    @mdshafiulalam2287 2 года назад +1

    It helps me . Thank you

  • @_t.anu._.1864
    @_t.anu._.1864 2 года назад +1

    Informative one.. Ty

  • @oudomchem5133
    @oudomchem5133 4 года назад +3

    Thank you sir.

  • @joyrainbowdress
    @joyrainbowdress 3 года назад +1

    Thank you so much

  • @adarshsingh1420
    @adarshsingh1420 4 года назад +3

    Thanks buddy It helped me a lot ;-)

    • @LearningLad
      @LearningLad  4 года назад +3

      Glad it helped

    • @Deepak-bk3lz
      @Deepak-bk3lz 2 года назад

      @@LearningLad Not able to work ..need more help

  • @dracula3387
    @dracula3387 3 года назад +1

    thanks lad u helped me

  • @mechguy0404
    @mechguy0404 3 года назад +1

    thanks for making this video...

  • @jimmymesa
    @jimmymesa 5 лет назад +2

    Good one. Not very complicated.

  • @matsaramachandrarao2746
    @matsaramachandrarao2746 2 года назад

    Thanks bro, this video is very useful for beginners like me.

  • @sonammalik17
    @sonammalik17 2 года назад +1

    Osm bro u made my day

  • @CSERaginiGupta-vc8hd
    @CSERaginiGupta-vc8hd 3 года назад

    Thank-you so much
    I got fom beginning to the end all info

  • @yourlinuxguy
    @yourlinuxguy 2 года назад

    Keep it up, Guys you can do this.

  • @jkrowlingsslave
    @jkrowlingsslave 3 года назад +1

    Thank you!

  • @alinanaqvi1340
    @alinanaqvi1340 2 года назад +1

    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.

  • @muralidhar394
    @muralidhar394 5 лет назад +2

    Thanks a lot bro

  • @tjmozdzen
    @tjmozdzen 3 года назад +1

    Very nice!

  • @satyabratbarik204
    @satyabratbarik204 2 года назад +1

    It works
    Thank you

  • @madhurigaikwad6274
    @madhurigaikwad6274 3 года назад +1

    This video is a life saver

    • @LearningLad
      @LearningLad  3 года назад

      Glad this video helped you :)

  • @sjjayaswal7621
    @sjjayaswal7621 2 года назад

    Good information 👍

  • @niteshmodi5468
    @niteshmodi5468 3 года назад

    Thank you bro. Nice explanation.

  • @doly099
    @doly099 3 года назад

    Thanks a lot❤️❤️ i'm very much grateful to you for this tutorial

  • @nokashich
    @nokashich 3 года назад +1

    bloody awsum if I'm finding programming books

  • @brianmuhia2955
    @brianmuhia2955 3 года назад +1

    great video

  • @CG-yw3eq
    @CG-yw3eq 3 года назад +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?

  • @prasadghodake3169
    @prasadghodake3169 2 года назад +1

    Thanks

  • @arijeetsingh9444
    @arijeetsingh9444 3 года назад +1

    Thanks.

  • @getptv8356
    @getptv8356 5 лет назад +2

    thanks very much!!!!!!!

  • @ravd2379
    @ravd2379 2 года назад

    thank so much man that helped alot
    f.m its allways those indian dudes

  • @dionjohnson4655
    @dionjohnson4655 3 года назад +2

    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 года назад +1

      i don't really get your problem.
      check whether in your code, you have declared some variables and haven't used them

  • @play7.017
    @play7.017 3 года назад +1

    thnx bro

  • @anthonymarquez2542
    @anthonymarquez2542 3 года назад +1

    great vid

  • @priyeshpramanik6411
    @priyeshpramanik6411 4 года назад +1

    Thanx for you help

  • @goedeck1
    @goedeck1 Год назад +1

    thank you

    • @LearningLad
      @LearningLad  Год назад

      You're welcome

    • @goedeck1
      @goedeck1 Год назад +1

      I had codeblocks already so I was very happy seeing my version when I typed gcc --version!

  • @djstudio759
    @djstudio759 2 года назад

    Thnx ❤️

  • @bharatibansode5871
    @bharatibansode5871 2 года назад

    Nice exlplatnation

  • @shrinidhikulkarni2231
    @shrinidhikulkarni2231 5 лет назад +2

    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

  • @sheetalpandey8299
    @sheetalpandey8299 5 лет назад +2

    Happy holi sir

  • @shuaidea
    @shuaidea 3 года назад +1

    thank u

  • @ohmyfoodies2753
    @ohmyfoodies2753 3 года назад +1

    Tysm❤

  • @ebrimasaho7978
    @ebrimasaho7978 5 лет назад +3

    the lectures are arranged sequentially

  • @Hafizislam177
    @Hafizislam177 3 года назад

    love you bro

  • @payalsagar1808
    @payalsagar1808 3 года назад +1

    Wow thanks a lot:)

  • @shalenmathew
    @shalenmathew 2 года назад

    God bless you

  • @ParadoxPRIMITIVE
    @ParadoxPRIMITIVE 3 года назад

    thanks so much!

  • @rachanabubna7172
    @rachanabubna7172 4 года назад +1

    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

  • @ayushimishra3032
    @ayushimishra3032 4 года назад +2

    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 !!!

  • @nani.official45
    @nani.official45 3 года назад +1

    When typing gcc (file name)
    Showing error message like no such file or directory
    Fatal error: no input files &
    Compilation terminated

  • @alexschmidt4427
    @alexschmidt4427 5 лет назад +2

    Hello Anil how are you beside RUclips?
    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 лет назад +1

      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

  • @eldhoelbinjohnson4099
    @eldhoelbinjohnson4099 3 года назад +1

    Sir while typing gcc hello world.c it shows fatal error. Pls tell for this sir pls

    • @LearningLad
      @LearningLad  3 года назад

      if your file name contains space then write it between double quotes
      gcc "hello world.c"

  • @hjk86259
    @hjk86259 3 года назад +1

    Can't we change the code while we once run thee code on cmd??(when cmd is working)

  • @thulanitinashe6475
    @thulanitinashe6475 4 года назад +1

    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?

  • @minhphunguyen4472
    @minhphunguyen4472 3 года назад +1

    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  3 года назад +1

      I think that depends on the idea/ toolset they are using
      I think codeblocks ide displays that info

  • @000hugohew
    @000hugohew 4 года назад

    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.

  • @amitavpanda3417
    @amitavpanda3417 5 лет назад +1

    what does dir mean and why u type dir ?
    plz response

    • @laurentiutrifan9092
      @laurentiutrifan9092 4 года назад

      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.

  • @amanshah9161
    @amanshah9161 3 года назад +1

    Gcc is not recognized as an internal or external command ye error aa rhi hai

    • @LearningLad
      @LearningLad  3 года назад

      gcc in lowercase
      also make sure that you have set the path environment variable properly

  • @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

  • @harshavardhan6823
    @harshavardhan6823 3 года назад +2

    I Am Not Getting The result ,Instead I am getting access denied . plz reply me

  • @Alpha-uw6wn
    @Alpha-uw6wn 3 года назад +1

    I am. Getting 67 bytes while you're getting 68 bytes, after gcc helloworld I ma getting error like warning return type default to int please help me out in this...

  • @M7D_aska
    @M7D_aska Год назад +1

    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

    • @LearningLad
      @LearningLad  Год назад

      that's ok
      i think in your system displaying file extension option is disabled
      so you see only 'a'

  • @pritesh_2564u
    @pritesh_2564u 2 года назад

    Can we use microsoft word to write our c code ?

  • @shankar4510
    @shankar4510 3 года назад

    hello to all the people who build their project like this go check out day one video of handmade hero. (not the intro to c .actual day 1 )

  • @sherlitanavarro2752
    @sherlitanavarro2752 3 года назад

    Can you add how to open a programs help system🤔