This document introduces C programming and provides an overview of programming languages. It discusses that programming languages can be categorized into machine language, assembly language, and high-level languages. C programming is then introduced, including that it was developed in 1970, standardized in 1989, and used to develop UNIX. The basic structure of a C program is outlined including the documentation, link, definition, main, and subprogram sections.
2. What is Programming Language?
• An artificial language used to write instructions that can
be translated into machine language and then executed
by a computer.
• There are many programming languages. Like C, C++,
Perl, BASIC, COBOL, Java, etc.
www.programmingcampus.com
3. Types of Programming Language
• Programming languages are fall into three broad
categories.
• Machine Language.
• Assembly Language.
• High level Language.
www.programmingcampus.com
4. Machine Language
• Machine Language is basically the only language which
computer can understand.
• machine code, which is represented inside the computer
by a String of binary digits (bits) 0 and 1.
• The symbol 0 stands for the absence of Electric pulse
and 1 for the presence of an electric pulse .
• For Example:
• 1 is written in machine language as 0001.
www.programmingcampus.com
5. Assembly language
• It was developed to overcome some of the many
inconveniences of machine language.
• in which operation codes and operands are given in the
form of alphanumeric symbols instead of 0’s and l’s.
• These alphanumeric symbols will be known as
mnemonic codes and can have maximum up to 5 letter
combination
• For example:
• ADD – Addition
• SUB – Subtraction.
www.programmingcampus.com
6. High-level Language
• High level computer languages give formats close to
English language.
• High-level languages are basically symbolic languages
that use English words and/or mathematical symbols
rather than mnemonic codes.
• Each instruction in the high level language is translated
into many machine language instructions thus showing
one-to-many translation.
www.programmingcampus.com
7. Introduction to C Programming
• It is developed by Dennis Ritchie in 1970 at Bell Labs.
• In 1983 American National Standards Institute(ANSI)
appointed a technical committee to define a standard for
C.
• The committee approved a version of C in December
1989 which is now known as ANSI C.
• Used to develop UNIX.
www.programmingcampus.com
8. Basic Structure of C program
• Documentation section
• Link section
• Definition section
• Global declaration
• main() Function section
{
Declaration part
Executable part
}
• Subprogram section
www.programmingcampus.com
9. • Document Section
It consists a set of comment lines giving program
details.
• Link Section
It provide the instruction to the compiler to link
function from the system library.
• Definition Section
It define all symbolic constants.
• Global Declaration Section
It declare variable & function global which can be
use in entire program. We can use them more than one
function.
www.programmingcampus.com
10. • main() function section
– This section content two parts..Declaration part & Execution part.
– Declaration part declare all variables used in execution part.
• Subprogram Section
– Subprogram section contain all the user define functions which
are called in main() function.
www.programmingcampus.com
11. Simple C Program
#include<stdio.h >
void main()
{
printf(“ProgrammingCampus”);
}
Output:
ProgrammingCampus
www.programmingcampus.com