What is Programming Language?
Programming language are defined as a language which are used to implement some logics
into its process forms.
There are two types of Programming language: i) High Level Language(HLL), ii) Low Level
Language(LLL)
HLL are easy to develop but execution time is more.
LLL are hard to develop but execution time is less.
HLL may consists of English alphabets ,numeric symbols and special characters.
LLL may consists of machine level codes and binary information.
Introduction to C
The C Language has the property of high level languages and low level languages. That is
why C language is often called as a middle level language.
It is follows the top-down approach.
It is does not support the code re-usability concept.
The C programming language is a structure oriented programming language, developed
at Bell Laboratories in 1972 by Dennis Ritchie
C programming language features were derived from an earlier language called “B”
(Basic Combined Programming Language – BCPL)
C language was invented for implementing UNIX operating system
In 1978, Dennis Ritchie and Brian Kernighan published the first edition “The C
Programming Language” and commonly known as K&R C
In 1983, the American National Standards Institute (ANSI) established a committee to
provide a modern, comprehensive definition of C. The resulting definition, the ANSI
standard, or “ANSI C”, was completed late 1988.
Compiler: A compiler is a special program that process the statements
written in a particular programming language and converts them into
machine language at one go. The compiler follow the I-P-O cycle.
Variable: Variables are the symbols of which can store some values or
expressions for calculating. So we can say that it act as a container to the
constants or expressions.
Constant: It is defined as the numeric symbol or a collection of character
which can be stored as a content to the variables. The value of a constants
are fixed.
Basic structure of a C program:
Structure of C program is defined by set of rules called protocol, to be followed by programmer
while writing C program. All C programs are having sections/parts which
are mentioned below.
Documentation section
Link Section
Definition Section
Global declaration section
Function prototype declaration section
Main function
User defined function definition section
Programs:
1. Wap to create a calculator program with runtime value.
2. Wap to find Area and Perimeter of Rectangle ,Circle, Square.
3. Wap to convert and print the distance of city in meters, feet, inches and
centimetres. Input the distance (in KM) at runtime.
4. Wap to convert the temperature from Fahrenheit to Centigrade.
Formula: (F-32)/9*5
5. Wap to interchange the two number using third variable. And not using
third variable.
6. Wap to find the aggregate and Percentage of a student’s marksheet.