Programming Logic Using ‘C’
BCAC0001
Lect-2 Features of C
Presented by:
Atul Kumar Uttam
Assistant Professor
Computer Engineering & Applications Department,
GLA University, Mathura
atul.uttam@gla.ac.in, +91-8979593001
Features of C
– Mother language
– System programming language
– Procedure-oriented programming language
– Structured programming language
– Mid-level programming language
– Machine independent / Portable
– Rich Library
– Fast Speed
– Extensible
<Subject Code> <Name of Subject> 2
1) C as a mother language
• Most of the compilers/interpreters, JVMs, Kernels,
etc. are written in C language
• Many core concepts of C are used in modern
languages
• C++, Java, C#, Python
<Subject Code> <Name of Subject> 3
2) System Programming Language
• It can be used to do low-level programming
– device driver
– Kernel (Linux kernel is written in C)
<Subject Code> <Name of Subject> 4
3) Procedural language
• Procedure:
– Program is a sequence of instructions
– What to do & How to do
<Subject Code> <Name of Subject> 5
4) Structured Programming
• Structure means to break a program into parts or
blocks
• Easy to understand
• Easy to debug
<Subject Code> <Name of Subject> 6
5) Mid level programming language
• Supports the features of –
– Low level languages (assembly)
• Pointer arithmetic
– High level languages (Java, Python)
• Machine independent
<Subject Code> <Name of Subject> 7
6) Machine independent / Portable
• If you write a C code in your machine, it will run on any
machine which supports C, without modifying a single line of
code.
• Because it is not tied to any hardware or system.
• We can say, it is a hardware independent language or
platform independent language.
<Subject Code> <Name of Subject> 8
7) Rich Library
• Every C compiler comes with a set of ready-to-use functions,
called C standard library.
• The use of these library functions saves considerable
programming effort.
<Subject Code> <Name of Subject> 9
8) Fast Speed
• A C program is executed very quickly.
<Subject Code> <Name of Subject> 10
9) Extensible
• C language is extensible because it can easily adopt new
features.
<Subject Code> <Name of Subject> 11
Disadvantages of C
• Concepts of OOP
• Compiled
• No concept of namespace
• Lack of Exception Handling
• Low level of abstraction
• Less Secure
• Many bugs can’t be detected by compiler
<Subject Code> <Name of Subject> 12