Starting with C
Started with
C
History of C:
C programming language was developed by Dennis Ritchie in
1972 at AT & T Bell Lab.
·
In earlier named
B that developed by Ken Thompson in 1960-1970.It provided the basic of
development of C.
·
C was designed to
write system programs under UNIX operating system but it is popular in industry
for a wide range of applications.
·
The version of C
was known as K&R (Kernighan and Ritchie) C.
·
The ANSI
(American national standard institute) develop standard version of the language
known as ANSI C.
Turbo C++:
Turbo C++ is a Borland International’s implementation of
a compiler for C language.
It is complete IDE (Integrated
Development Environment) to create ,edit and save program.
Shortcuts:
Alt+F-------open
file menu
f2-------save a program
f1--------help
f3--------open a file
f9-------make
f10-------menu
Alt+f9---------compile a program
Alt+f5--------see program output
Ctrl+f9---------execute a program
Alt+x--------to exit compiler
Create a
program:
To write a C program, open the window of the Turbo C++
IDE. This can be done by selecting File/New option from the menu bar. A window
appears:
Cursor inside the window
represents the starting point to write a program.
Save a C program:
After writing a program, we should save it for later use.
This can be done by selecting File/Save command from the menu bar and also done
by its shortcut (f2).The caption appear:
Type
the name of file in it and press Enter. By default the file is stored in BIN
folder.
By default name is NONAME00.cpp.
Compile a C Program:
C compiler translates the source program into object
program with .obj extension. To invoke compiler select compile/compile from
menu bar or by its shortcut.
If there is no error in the
source program, the program will be translated to object program successfully
otherwise, report an error in the program.
Source
code:
The program written in any high level programming
language is called source code.
Object code:
The compiler produces an object program from the
source program that is written in machine code (0, 1).
Linking:
“Linking is the process in which the object file produce
by the compiler is linked to many other library files by the linker.”
Linker:
“The linker combines different library files
to the object file and produce an executable file with .exe extension.”
Execution of program:
After compiling and linking the program, we are now ready
to execute it. For execution the program must be loaded into memory (RAM). This
is done by the loader.
In Turbo C++ this is done by
selecting Run/Run from the menu bar and its shortcut (ctrl+f9).
Loader:
Loader is a program that places executable
file in memory.
Comments
Post a Comment