Results 1 to 3 of 3

Thread: Run in DOS prompt

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Answers
    1

    Run in DOS prompt

    How i can compile and run my C programs in DOS prompt with out using BC or TC or other editors


  2. #2
    Junior Member
    Join Date
    May 2008
    Answers
    1

    Re: Run in DOS prompt

    Call u r .exe from dos prompt..u can also pass parameters (command line parameters)
    Eg:c:\tc\sum.exe 1 2


  3. #3
    Expert Member
    Join Date
    Mar 2012
    Answers
    208

    Re: Run in DOS prompt

    (i) Write the C program (call it ``myfile.c'') in a text editor or word processor (for example, the simple ``Hello'' program below),
    (ii) Save it as a file on your computer's hard disk,
    (iii) Compile it to a computer-executable program by entering a compile command at a command prompt, for example for the following C compiler programs: gcc -Wall -o myfile myfile.c
    (using the GNU C compiler, UNIX or Microsoft Windows)
    cl myfile.c
    (Microsoft Visual C++ command-line compiler)
    bcc32 myfile.c
    (Borland C/C++ compiler, Microsoft Windows)
    followed by the Enter key, and finally
    (iv) Run the program by entering
    myfile


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact