Sunday, February 13, 2011

how do you run a c program in cmd

hi friends i am siva sankar reddy s

I was just opened the cmd in windows and creted a directory by using "md" command and opened a text file by "notepad " and I did my program in that file and given .c extention to save that file.

Now I want to know how to compile and run that c program to get out put.

One more thing is I need all .exe files of all my programs in my directory.

Help me how to do this and what is the path I have to give?

  • You need a compiler - are you using Visual Studio? GCC? The compiler you are using should come with some simple setup instructions to help to get you going.

  • Maybe this c compiling handout can be of any use.

    It shows all the steps needed to create a c based executable file.

    From Gamecat
  • Free (beer-free, not necessarily speech-free) C compilers for Windows include (from memory so there may be others):

    • MinGW (Minimalist GNU for Windows)
    • MSYS
    • Cygwin
    • Eclipse CDT (which uses GNU under the covers I think)
    • Borland C++ (from their BDN museum site)
    • Visual C++ Express
    From paxdiablo
  • I would recommend if there is no reason to use MS windows, try linux.

    http://www.ubuntu.com/testing/intrepid/beta

    The development environment is free.

0 comments:

Post a Comment