There are several such IDEs available in the
market targeted towards different operating systems. For example, Turbo C,
Turbo C++ and Microsoft C are some of the popular compilers that work under
MS-DOS; Visual C++ and Borland C++ are the compilers that work under Windows,
whereas gcc compiler works under Linux. Note that Turbo C++, Microsoft C++ and
Borland C++ software also contain a C compiler bundled with them. If you are a
beginner you would be better off using a simple compiler like Turbo C or Turbo
C++. Once you have mastered the language elements you can then switch over to
more sophisticated compilers like Visual C++ under Windows or gcc under Linux.
Assuming
that you are using a Turbo C or Turbo C++ compiler here are the steps that you
need to follow to compile and execute your first C program…
a)
Start
the compiler at C> prompt. The compiler (TC.EXE is usually present in
C:\TC\BIN directory).
b)
Select
New from the File menu.
c)
Type
the program.
d)
Save
the program using F2 under a proper name (say Program1.c).
e)
Use Ctrl
+ F9 to compile and execute the program.
f)
Use Alt
+ F5 to view the output.
Note
that on compiling the program its machine language equivalent is stored as an
EXE file (Program1.EXE) on the disk. This file is called an executable file.
No comments:
Post a Comment