2. BASIC, FORTON, COBOL, PASCAL – High level
languages. These are application specific i.e. they are
used to develop application related to particular field.
Assembly language and machine language – low level
languages. These are machine level languages and
designed to give machine efficiency.
C is middle level language. It provides facilities of the
both high level language and low level language. It is not
application specific. It can be used to develop many
different types of the applications. Thus C is a general. It
is not hardware or system dependent. Hence portable
programs can be written with C compiler and operating
system can be written using C.
3. General purpose structured language : the
instructions consists of a algebraic expression
supported with English keyword such as if, else, for,
goto, continue, break etc.
Programming language : It is simple to implement and
highly effective.
Compatible language : It can run on all machines right
from 8088 to recent machines.
Concise language : Only a small set of instructions are
required to get a task done.
Rich set of built in functions.
Provides variety of the data types, operators and
functions which makes it’s code highly efficient and fast.
4. Supports the pointers which can directly access the
address of the variable in the computer’s memory.
Has only 32 keywords.
Modular programming : It is a logical collection of a
one or more functions of modules.
Provide dynamic memory allocation.
Extensible : continuously adds the library functions
supported by the C library.
Middle level language : it provides high level
programming supports as well as low level programming
supports .
5. C does not supports inheritance, makes it more
complex to use because everything has to be written
from scratch.
The switch statement doesn’t allow float data type.
The switch statement doesn’t allow logical operators.
Pointers are difficult to handle in ‘C’.
Provide only one major memory allocation function:
malloc
C statements having a specific and complicated
syntax that programmer needs to learn.
6. Compilers, libraries, and interpreters of other high
level languages are often implemented in C.
Right from creating other software’s like “Unix”,
“Windows”, and many Antivirus etc. C is also
used in developing many applications.
C is also used to write programs like “ Embedded
Device”, Chip designing, Industrial Automobile
production etc.
It is a combination of the high level language and
low level language.
7. Documentation section
/* tells the purpose of the program */
// program to add two numbers.
Link section
#include<stdio.h>
Definition section
#define PI 3.14
Global variable declaration
main() function section
{
variable declaration/initialization;
program statements;
}
Subprogram section
Function 1()
{
statements;
}
8. Documentation section consists of a statements.
They are used in a program to improve the
readability and understanding.
Comments are not executed in the programming.
Comments help to understand the program by
user.
Comments help to understand logic of the
program.
Single line comment denoted by //.
Multiple line comments denoted by /*……*/.
9. It is consists of a preprocessor directives which
link the compiler to the standard library functions.
We include the different library functions in the C.
They are availabele in the header files.
#include<stdio.h> is a header file consists of a
standard IO functions.
#include< math.h> consists of a mathematical
functions.
11. It is declares global variable.
They are used in more than one functions.
They are delcared outside the all functions.
12. Is a special and important function used ny C
program to tell compiler where the program starts.
Every program has exactly one main() function.
If it consists of more than one compiler can’t tell
from where program has to be start.
The opening’{‘ and closing ‘}’ braces are indicates
begin and end of the main() function.
All C statements always terminate with the a
semicolon(;).