Keyword is a word that has special meaning to a program or in a programming language. Keywords usually include those words used for control statements, data declarations. A keyword can be used only in certain predefined circumstances; it cannot be used in naming variables, files labels, documents or user generated tools such as macros. All keywords are written in lowercase letters.
C is the native language of UNIX. UNIX is the major interactive OS on workstations, servers and mainframes. C is the standard development language for personal computers. Most Windows application, database programs, graphics libraries, and other large applications are written in C.
C code is very portable. C is capable of running on more than one computer system or under more than one OS. It is easy to get a program written in C on one machine to run on a different machine. There are very few features built in C, but using functions, you can expand the language. The C language does not even have built-in routines for printing to the screen or reading from the keyboard. However, there are standard functions for these and other tasks which are supplied with the C compiler. C programs use a standard library that works the same in all machines. Using these libraries the programmers to build programs that can run in any machine that has these libraries.
C is a structured language. C emphasizes structured programming. In this style of programming, a complex program is broken down into subprograms, each of which can be coded and tested individually. The various programs need not even be programmed by the same programmer.
C is a “middle-level language”.
C programming language behaves as high level language through function, it gives a modular programming and breakup, increased the efficiency for resolvability.
C programming language support the low level language i.e. Assembly Language.
C language also gives the facility to access memory through pointer.
Its combines the elements of high-level languages with the functionalism of assembly language.
C has a powerful set of operators that allows the direct manipulation of bits, bytes, words and pointers.
C is the foundation for C++ and Java.
C is considered difficult to learn.
It can be difficult to follow because of its conciseness.
It is not suited to applications that require lots of reports.
What is the Turbo C compiler?
Turbo C is a particular version of C developed by Borland International Corporation in 1987. Turbo C is designed to run on various microcomputers systems. Borland C is the professional version of Turbo C. Although Borland C contains essentially the same compiler as Turbo C, it comes with programming support tools.
Turbo C provides both an Integrated Development Environment (IDE) and the more traditional command-line version to satisfy the needs and desires of many programmers.
Using C in its IDE makes more programming more flexible. This interface includes a complete environment in which to create, edit, test, compile, link and run your C programs. This programming environment consists of a number of components which include the following:
Editor– used to create a C program called the source code
Extended C language – Turbo C is significantly extended from the “bare-bones” language of Ritchie’s specifications. The extensions included enhancements which make Turbo C compatible with the ANSI standard.
Compiler – used to compile the source code into the machine language object code
Debugger – used for testing a program and locating programming errors
Run-time Environment – an environment with the capability of running programs within the Turbo C system
User Interface – the portion of a program with which a user interacts
The C compiler converts a C program(the source code) into machine language(object code) before the computer can execute the program.
Type the letter of the menu item you want (e.g., press E or e to select the Edit menu)
Note: You cannot use the mouse while in Turbo C screen.
Main menu bar - contains a list of menus which organizes all the commands and operations used in Turbo C.
Edit window – used by Turbo C’s editor. It is the area where you enter and edit your C program. It is activated by pressing Alt+E or F10 while in the main menu. The top line of the Edit window is the Edit status line, which tells your various things about the state of the Editor and the file you are editing. Line and Col tells of the location of the cursor on the Edit window. When you start a new program by choosing File→ New, C calls it NONAME.C
Message window – used to display various compiler or linker messages.
“Hotkey” reference line – contains a list of useful shortcuts or key-combination used to immediately execute a defined option or function.
To quit Turbo C, choose File → Quit or simply press Alt+X. If your current file on the Edit window has been modified since it was last saved, Turbo C will asked whether you wish to save your file or not.
Setting Up Your Working Environment
Simply put, setting up your working environment in Turbo C is making sure the path to the different directories used by the Turbo C program correctly reflected under Options → Directories menu. If the environment was not set up you will encounter linking error messages, such as “Unable to open file STDIO.H”
Set up your environment.
Save your directories.
You can start making your C program.
Once you have save your set up for environment once you open again your Turbo c just go to Options menu and select retrieve options and hit enter and select TCCONFIG.TC and hit enter again.
Loading a file onto Turbo C editor
Choose File →Load or press F3 at the main Turbo C screen.
A prompt box will appear containing the wildcard notation *.C.
You can type in your file’s name or you can press Enter, select the desired file using arrow keys and then press enter
You can run your program by choosing Run → Run , or by simply pressing Ctrl+F9.
When your program is not yet compiled yet, Run will compile it first, and then run it.
Editing the Program
If your program contains errors which prevent the C compiler or the linker in performing their tasks, each will perform you that the compilation or the linking processes were unsuccessful through the compiling window or linking window.
Turbo C ties down the editing process with the compilation/linking process. If you press any key at the Compiling or Linking window you can reenter the Edit mode in the Message window.
The error messages are highlighted including the part of your program which caused the error.
If there are several errors, you can use the up and down arrow keys to scroll through the various errors.
You can press enter to view the specific error message on the Edit window and Enter again to be able to start entering the appropriate corrections (or you can simply press F6.)
To switch the between the edit window and the message window, also press F6.
Saving the program
Choose File → Save or press F2.
If you want to retain the old C program for future use reference, you can save your new program under a different name by choosing File → Write to.
#include /*this library defines printf*/
clrscr(); /*this function clears the user screen*/
getch(); /*this function allow the program to pause to see the output*/