0% found this document useful (0 votes)
179 views

The Turbo C Environment

The document describes the four main parts of the Turbo C development environment: 1) the main menu, 2) the editor status line and edit window, 3) the compiler message window, and 4) the hot key quick reference line. It also outlines the basic structure of a C program, commonly used include files in C like stdio.h and string.h, and important symbols such as newline (\n), single/double quotes, and curly braces.

Uploaded by

Jirou Shiba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views

The Turbo C Environment

The document describes the four main parts of the Turbo C development environment: 1) the main menu, 2) the editor status line and edit window, 3) the compiler message window, and 4) the hot key quick reference line. It also outlines the basic structure of a C program, commonly used include files in C like stdio.h and string.h, and important symbols such as newline (\n), single/double quotes, and curly braces.

Uploaded by

Jirou Shiba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

THE TURBO C ENVIRONMENT

Topics Outline
 Four Parts of the Turbo C Environment
 Structure of a Simple C Program
 Commonly Used include files in C
 Important Symbols
Four Parts of the Turbo C
Environment
1. Main Menu
2. Editor Status Line and Edit Window
3. Compiler Message Window
4. ‘’Hot Key’’ Quick Reference Line
Four Parts of the Turbo C
Environment (cont.)
1

3
4
Figure 1. Turbo C Environment
Four Parts of the Turbo C
Environment (cont.)
Main Menu
It instructs Turbo C to do something as
indicated in the list of menu. It can be activated
or can be used by pressing Alt key and the first
letter of the menu.

Figure 2. Turbo C’s Basic Menus


Four Parts of the Turbo C
Environment (cont.)
Main Menu
Turbo C’s Basic Menus:
1. File – used to load and save files, handles
directories, invokes DOS and exits Turbo C.
2. Run – used to compile or check for errors,
links and runs the program currently loaded
in the environment.
Four Parts of the Turbo C
Environment (cont.)
Main Menu
Turbo C’s Basic Menus:
3. Compile – used to compile the program
currently in the environment.
Four Parts of the Turbo C
Environment (cont.)
Main Menu

Figure 3. Basic Submenus of File Menu


Four Parts of the Turbo C
Environment (cont.)
Main Menu
Basic Submenus of File Menu:
1. Load – enables the user to select a file to be
opened or loaded into the editor.
2. Pick – enables the user to select a file based
on the last nine files previously opened or
edited.
Four Parts of the Turbo C
Environment (cont.)
Main Menu
Basic Submenus of File Menu:
3. New – lets the user edit a new file or start
new programs.
4. Save – store or saves the file currently in the
editor.
5. Write to – enables the user to save a file
using a different filename.
Four Parts of the Turbo C
Environment (cont.)
Main Menu
Basic Submenus of File Menu:
6. Directory – displays the content of the
current working directory.
7. Change dir – enables the user to specify the
defined path to change the default path or
directory.
Four Parts of the Turbo C
Environment (cont.)
Main Menu
Basic Submenus of File Menu:
8. OS Shell – loads the DOS command
processor and lets the user execute DOS
commands
9. Quit – lets the user to exit or quit Turbo C
Four Parts of the Turbo C
Environment (cont.)
Editor Status Line and Edit Window

Figure 4. Insert Mode

Figure 5. Overwrite Mode


Four Parts of the Turbo C
Environment (cont.)
Compiler Message Window
It is located beneath the middle of Edit
Window and Hot keys. It is used to display
various compiler or linker messages.
Four Parts of the Turbo C
Environment (cont.)
‘’Hot Key’’ Quick Reference Line
Hot keys are located at the bottom of
Turbo C’s opening screen. It refers to shortcut
or shorthand for selecting a menu. Two sets of
Hot keys are available:
a. Normal
b. Alternate Set
Four Parts of the Turbo C
Environment (cont.)
‘’Hot Key’’ Quick Reference Line

Figure 6. Normal Hot Keys

Figure 7. Alternate Hot Keys


Structure of a Simple C Program
#include <directive>
#define <directive>
main()
{
<variable declaration section>
<statements>

}
Structure of a Simple C Program
(cont.)
1. #include <directive> - contains information
needed by the program to ensure the
correct operation of Turbo C’s standard
library functions.
2. #define <directive> - It is used to declare
constants.
Structure of a Simple C Program
(cont.)
3. Variable declaration section – it is the place
where you declare your variables.
4. Body of the program – start by typing main()
and the open and close braces. All
statements should be written inside the
open and close braces.
Commonly Used include files in C
1. alloc.h – declares memory management
functions
2. conio.h – declares various functions used in
calling IBM-PC ROM BIOS
3. ctype.h – contains information used by the
classification and character conversion
macros.
Commonly Used include files in C
(cont.)
4. math.h – declares prototype for the math
functions.
5. stdio.h – defines types and macros needed
for standard I/O.
6. string.h – declares several string
manipulation and memory manipulation
routines.
Important Symbols
1. \n – is a line character used to move the
cursor to the next line.
2. ‘ ‘ – single quote used for single character.
3. “ “ – double quote used for two or more
character.
4. { } – open and close curly braces signify the
beginning and ending of a function.
Important Symbols (cont.)
5. % – used for format specifiers
6. & – address of variable
7. * – pointer

You might also like