answersLogoWhite

0

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

User Avatar

Wiki User

16y ago

What else can I help you with?

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.


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.


DOS Command to go to the Root Directory?

type at DOS prompt CD c:\


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 run a dos command from a c program?

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


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


What is the command to run program in ms Dos?

To run a program in MS-DOS, you simply need to type the name of the executable file followed by pressing the Enter key. For example, if the program is named "myprogram.exe," you would type myprogram and hit Enter. If the program is not in the current directory, you need to specify the full path, like C:\path\to\myprogram.exe.


Can you write program by c language in dos?

Yes.


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.