article-2.doc
TRANSCRIPT
7/27/2019 Article-2.doc
http://slidepdf.com/reader/full/article-2doc 1/2
Introduction to C programming
Powerful features, simple syntax, and portability make C a preferred language
among programmers for business and industrial applications. Portability meansthat C programs written for a computer with a particular kind of processor, say
Intel, can be executed on computers with different processors such as Motorola,Sun Sparc, or IBM with little or no modification.
C language is widely used in the development of operating systems. An OperatingSystem(OS) is a software(collection of programs) that controls the variousfunctions of a computer. Also it makes other programs on your computer work.For example, you cannot work with a word processor program, such as MicrosoftWord, if there is no operating system installed on your computer. Windows, Unix,
Linux, Solaris, and MacOS are some of the popular operating systems.
Origin of C
Dennis M. Ritchie, a systems engineer at Bell Laboratories, New Jersey developed C
in the early 1970’s. Although designed for the Unix operating system, it soon proved
itself a powerful, general purpose programming language. You can learn more about
the history and development of C by visiting the following Web page: http://cm.bell-
labs.com/cm/cs/who/dmr/chist.html
Where is C useful?
C’s ability to communicate directly with hardware makes it a powerful choice forsystem programmers. In fact, popular operating systems such as Unix and Linuxare written entirely in C. Additionally, even compilers and interpreters for otherlanguages such as FORTRAN, Pascal, and BASIC are written in C. However, C’s
scope is not just limited to developing system programs. It is also used todevelop any kind of application, including complex business ones. The following isa partial list of areas where C language is used:
Embedded Systems
Systems Programming
Artificial Intelligence
Industrial Automation
Computer Graphics Space Research
Image Processing
Game Programming
What kind of language is C?
C is a structured programming language, which means that it allows you to develop
programs using well-defined control structures (you will learn about control
structures in the articles to come), and provides modularity (breaking the task into
multiple sub tasks that are simple enough to understand and to reuse).
C is often called a middle-level language because it combines the best elements of
low-level or machine language with high-level languages.
7/27/2019 Article-2.doc
http://slidepdf.com/reader/full/article-2doc 2/2
Why you should learn C?
You should learn C because:
• C is simple.
• There are only 32 keywords so C is very easy to master. Keywords arewords that have special meaning in C language.
• C programs run faster than programs written in most other languages.
• C enables easy communication with computer hardware making it easy to
write system programs such as compilers and interpreters.
C-Language keywords
Getting equipped to write C programs
The tools required for C programming are simple. All you need are:
1. A text editor: A text editor allows you to type in, modify, and save your program. Notepad in Windows, Edit in DOS, and vi and Emacs in
Unix/Linux are some popular text editors.
2. A C compiler: A compiler is a program that converts the high-level language
(HLL) program (referred to as source code) into machine language (object
code). Borland C, GCC, and Microsoft C are some of the popular compilers.
Earlier text editors and compiler had to be used separately. However, today most
software vendors provide them as a package called IDE (Integrated Development
Environment). Popular IDE’s include Turbo C from Borland Inc., and Microsoft C
from Microsoft Inc.
- Simhadri, Globarena
**********
S