[go: up one dir, main page]

0% found this document useful (0 votes)
28 views3 pages

Unit - 1

C is a programming language created in 1972 at Bell Laboratories to develop the UNIX operating system. It combines features of low-level and high-level languages, making it portable and suitable for developing system software and applications. To write and run a C program, developers use a text editor to write code and a compiler to translate it into machine-readable format. The compiler then links everything together to create an executable file that can run on other machines without recompiling.

Uploaded by

abhishekthummar6
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)
28 views3 pages

Unit - 1

C is a programming language created in 1972 at Bell Laboratories to develop the UNIX operating system. It combines features of low-level and high-level languages, making it portable and suitable for developing system software and applications. To write and run a C program, developers use a text editor to write code and a compiler to translate it into machine-readable format. The compiler then links everything together to create an executable file that can run on other machines without recompiling.

Uploaded by

abhishekthummar6
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/ 3

UNIT – 1 Introduction to Programming Language and its IDE

C Language

Introduction to Programming Language:


Language is mainly used for communication between two or more persons. Same way in
computer technology if we want to communicate with the system or we want to do some work in
computer then we have to give some commands or instructions to the system. For giving any
instruction or command to computer we required a special language & that is the computer
language such as C, C++, Pascal etc. Here general use of programming language is to solve any
particular problem with help of language.

C is a programming language which born at “AT & T’s Bell Laboratories” of USA in 1972. It was
written by Dennis Ritchie. This language was created for a specific purpose: to design the UNIX
operating system. American National Standards Institute (ANSI) formed a committee in 1983 to
establish a standard definition of C. This committee approved a version of C in 1989 which is
known as ANSI C.

Importance of C :
Now a day, there are many high level languages like Pascal, Basic, & Java. But C is a robust
language whose rich set of built in functions & operators can be used to write any complex logic
program. The C language compiler combines the capabilities of a low level language with the
features of high level language. Therefore the language is suitable for writing both system
software as well as business packages & other software.

1. Program written in C are very efficient & fast for the programmer & developer. This is due to its
variety of data types & powerful operators. It is many time faster than other languages. This
helps developers in saving their valuable time.
2. C is powerful & flexible language which helps system developers & programmers to deliver
various complex tasks with ease. C is used for diverse project as operating systems, word
processors, graphics, spreadsheets & even compilers for other languages.
3. C is popular among professional programmers for programming, as a result wide variety of C
compilers & helpful accessories are available.
4. There are only 32 keywords; several standard functions are available which can be used for
developing program.
5. C is highly portable language. This means that a C program written for one computer system can
be run on another system with little or no modification. Portability is enhanced by the ANSI
standard for C, the set of rules for C compilers.
6. Another feature is its ability to extend itself. A C program is basically a collection of various built-
in functions supported by C library. We can also add our own functions to the C library. These
functions can be reused in other applications or programs by passing pieces of information to the
functions, you can create useful, reusable code.
7. Writing program with user-defined functions makes program more simple & easy to understand.
Breaking a problem in terms of functions makes program debugging, maintenance & testing
easier.

High Level Language :


It is a programming language that is more user friendly to some extent platform independent &
abstract from low level computer processor operations such as memory accesses.
Low Level Language :
It is a programming language that is more machine specific & from computer processor
operations such as memory accesses is directly dependent.

SDJ International College Page 1


UNIT – 1 Introduction to Programming Language and its IDE

C – Middle Level Language :


C is often called a middle level computer language as it combines the elements of high-level
languages with the functionalism of assembly language.
C gives or behaves as High Level Language through Functions- gives a modular programming &
breakup; increased efficiency for reusability, C gives access to the low level memory through
pointers. Moreover it does support the Low Level programming i.e. Assembly Language.
C language is middle level language because:
1. C language behaves as High Level Language through functions – gives a modular programming &
breakup, increased efficiency for reusability.
2. C language gives access to the low level memory through Pointers. Moreover it does support the
Low Level programming i.e. Assembly Language.
3. As C Language a combination of these two aspects, it’s neither a High Level now a Low level
language but a Middle Level Language.

Introduction of C Editor
An editor is a one type of software tools in which user can type the text, modifying deleting and
formatting an existing text. To type your C program you need another program called editor.
Once the program has been typed it needs to be converted to machine language (0s and 1s)
before the machine can execute it. To carry out this conversion we need another program called
Compiler.
For example: Notepad, Wordpad, C editor Turbo C, Turbo C++, Dos Editor, JAVA, FoxPro etc.
For writing a C program, generally we are using TC (Turbo Compiler) editor and executing a C
program.

Here, some of the important shortcut keys are listed below for working with TC.
No. Shortcut Use
1 F2 Save Program file (Save C program with C extension)
2 F3 Open an existing save program file.
3 F5 To maximize editor area.
4 Alt + Back Space Undo last changes in editor.
5 Shift + Alt + Back Space Redo last changes by Undo.
6 Ctrl + Insert key Copy selected Text from Editor.
7 Shift + Del Cut selected Text from Editor.
8 Shift + Insert key Paste Copied or Cut text.
9 Ctrl + Del Clear selected Text.
10 Alt + F9 Compile C Program.
11 Ctrl + F9 Run C Program.
12 F7 or F8 Step by Step debugging.

Now 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 program 1.c).
(e) Use Ctrl + F9 to compile and execute the program.
(f) Use Alt + F5 to view the output.

Now, 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. If we copy this file to another

SDJ International College Page 2


UNIT – 1 Introduction to Programming Language and its IDE

machine we can execute it there without being required to recompile it. In fact the other
machine need not even have a compiler to be able to execute the file.

A word of caution! If you run this program in Turbo C++ compiler, you may get an error – “The
function printf should have a prototype”. To get rid of this error, perform the following steps and
then recompile the program.
(a) Select ‘Options’ menu and then select ‘Compiler’ |C++ Options. In the dialog box that pops
up, select ‘CPP always in the ‘Use C++ Compiler’ options.
(b) Again select ‘Options’ menu and then select ‘Environment | Editor’. Make sure that the
default extension is ‘C’ rather than ‘CPP’.

SDJ International College Page 3

You might also like