answersLogoWhite

0


Best Answer

Compile it, link it to an executable, then just enter its name and it starts running.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

system could use some investigation

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you run c program in dos prompt?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Can you write program by c language in dos?

Yes.


How to excute c program on dos?

Command-line and IDE C compilers: There are two types of C compilers, each of which has advantages and disadvantages: (i) Command-line C compilers and (ii) IDE or Windows C compilers To compile and run a C program using a command-line C compiler, you have to go through the following steps: (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 at a command prompt, again followed by ``Enter''. If you want to save the output of ``myfile'' as a text file ``myfile.txt'', enter instead myfile > myfile.txt


What command should be given to compile a C program from the command prompt?

You need a compiler. Gcc or g++ can be run from a unix shell, or a windows implementation of one like cygwin.


Which type of c program can be run on windows 7?

I guess you wanted to ask: why don't DOS-programs (like TurboC and programs generated by TurboC) run on Windows 7? Answer: it is by design; unlike older versions, Windows 7 doesn't have a built-in DOS-emulator. Download and use DosBox.


How do you compile and execute a 16 bit compiler program from a command prompt?

Compiler-dependent. If you have Turbo C, it will be command TCC

Related questions

How do you get to a C prompt?

To get to a C:/ prompt, run CMD.EXE.


DOS Command to go to the Root Directory?

type at DOS prompt CD c:\


What command should be given to run a C program from the DOS prompt?

This depends on what compiler you're using, but they all generally have the same process. Example: Converts source code stored in the file test.c into an executable program in test.exe using the GCC compiler... gcc -o test.exe test.c To run the program you can now just run test.exe.


How do you run c program without ideon dos?

Once the application is compiled, there is no need for an IDE.


How do you Hold the output window to display output in C language?

std::cin:get(); I guess it's about TurboC in Windows. 1. Press Alt+F5, to see the program's output 2. Run your .EXE in a separate DOS-window (Command Prompt)


How do you open a dos command prompt?

Just write the name of that program. For example, if you want to execute abc.exe under c drive then just execute following commands: c:\> abc and press enter.


How do you run a dos command from a c program?

#include <stdlib.h> int main() { system("dir"); return 0; }


How do you use dos prompt in C programming for turbo c compiler?

Use "OS Shell" from File menu.


What command would you use to completely format your C drive from the Dos prompt?

format /s c: should do the job.


How do you get to dos?

In any windows version, click start -> run and enter cmd or command to start DOS prompt..Answer1. If you are using Windows 98: click start, Shut down, select restart in MS-DOS mode. 2. For Windows XP: click start, All Programs, accessories, Command Prompt. If you do not see it go to C:\WINDOWS\SYSTEM32\cmd.


Can you write program by c language in dos?

Yes.


How do you run c programm with add two numbers?

1. Write the program 2. Compile and link it 3. Execute it by entering its name at command prompt