Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Need of Programming

1
Why Programming is important?
• Programming is important to innovate and create eco-friendly solutions for
global problems. It is important in our daily life to enhance and increase the
power of computers and the internet.

• Programming helps in speeding up the input and output processes in a


machine. It is important to automate, collect, manage, calculate, and analyze
the processing of data and information accurately. Programming helps
create software and applications that help computer and mobile users in
daily life.

2
C - Introduction
• C is a middle-level and general-purpose programming language that is ideal
for developing firmware or portable applications.

• Originally intended for writing system software, C was developed at AT & T


Bell Laboratories by Dennis Ritchie for the Unix Operating System in
the early 1970s.

• C was derived from a language called B which was written by Ken


Thompson, hence the name C to indicate it is a successor of language B.

• C is not a high-level language, instead, it is a mid-level language with the


simplicity of high-level language and power of low-level language.

• As a result, programs written in C are very fast.

3
History of C

4
Advantages of C program
• C's low-level features and direct hardware interaction make it well-
suited for system programming, allowing developers to manage
resources efficiently and implement system-level tasks effectively.

• C promotes code reusability through functions and libraries, enabling


the creation of modular and maintainable code, which can be easily
reused in different parts of a program or in other projects.

• C allows different modules to be present in separate source files,


promoting modular development. These modules can be compiled
independently, enhancing code organization, collaboration, and
facilitating updates without recompiling the entire program. C is one of
the most portable languages. 5
Advantages of C program

• C is highly portable, meaning that C programs can run on different


platforms with minimal modification. This portability is crucial for
developing software that can be deployed across various operating systems
and hardware architectures.

• C supports a wide range of data types, providing flexibility for


programmers to choose the appropriate data structures for their applications,
leading to efficient memory usage and enhanced program performance.

6
Disadvantages of C program
• C does not provide Object Oriented Programming (OOP) concepts.

• There are no concepts of Namespace in C.

• C does not provide binding or wrapping up of data in a single unit.

• C does not provide Constructor and Destructor.

7
Applications of C
• Operating Systems

C is widely used in the development of operating systems due to its efficiency and
ability to directly interact with hardware. Examples include Unix and Linux
kernels, which are primarily written in C.

• Language Compilers

• C compilers are crucial for translating human-readable C code into machine


code that computers can execute. Compilers like GCC (GNU Compiler
Collection) are written in C and used to compile C code into executable
programs.

8
• Text Editors

Text editors like Vim and Emacs are often extended or customized using C. The
C language provides the performance required for developing feature-rich and
efficient text editing software.

• Language Interpreters

Interpreters for scripting languages like Python or Ruby are sometimes


implemented in C to enhance their performance. The CPython interpreter for
Python, for instance, is primarily written in C.

• Assemblers

Assemblers convert assembly language code into machine code. While not as
commonly used as higher-level languages like C, assemblers are still employed
for tasks requiring low-level programming. Some assemblers and linker tools
are written in C.
9
English Language vs C Language

10
Features of C
• Simple

• Machine Independent or Portable

• Mid-level programming language

• Structured programming language

• Rich Library

• Memory Management

• Fast Speed

• Pointers

• Recursion

• Extensible
11
How does C Programming Language Work?

Execution of the C program involves 5 steps. These are:


• Creating the Program

• Preprocessing

• Compiling the Program

• Linking the Program with functions from the C library

• Executing the Program

12
How does C Programming Language Work?

13

You might also like