0% found this document useful (0 votes)
123 views

Fundamentals of C (PPT-1)

Uploaded by

Pulkit Pahuja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views

Fundamentals of C (PPT-1)

Uploaded by

Pulkit Pahuja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Problem Solving Using

(Fundamentals of C)

By :
Ms.Inderpreet Kaur
AP, BCA

1
Common Terms
 Computer
 Hardware

 Software

 Operating System

 Language
Computer language
 Computer language is the medium of communication between
man and the machine (computer).This communication is stored in
the form of programs written in a particular programming
language often called computer language.
 Computer programming languages allow us to give instructions
to a computer in a language the computer understands.
What is a programming language?
 A programming language is a vocabulary and set of grammatical
rules for instructing a computer to perform specific tasks. The
term programming language usually refers to high level languages,
such as BASIC, C, C++, JAVA,COBOL, ADA & PASCAL. Each
language has a unique set of keywords (words that it understands)
and a special syntax for organizing program instructions.
Why we need of programming language?
 The programming language enables
us to write efficient programs and
develop online solutions such as- mobile
applications, web applications, and
games, etc
History of ‘C’
C language was first developed in 1972 by
Dennis Ritchie at bell laboratories of AT&T
(American Telephone & Telegraph), located in
the U.S.A. It was developed to overcome the
problems of previous languages such as B,
BCPL,
BCPL
etc.B
Founder
derived of C

6
What is C language??
 C programming is considered as the base for
other programming languages, that is why it
is known as mother language.
 It can be defined by the following

ways/Other names of Programming C


1. Mother language

2. System programming language

3. Procedure-oriented programming language

4. Structured programming language

5. Mid-level programming language


1) C as a mother language

 C language is considered as the mother


language of all the modern programming
languages because most of the
compilers, JVMs, Kernels, etc. are
written in C language, and most of the
programming languages follow C syntax, for
example, C++, Java, C#, etc.
 It provides the core concepts like
the arrays, strings,functions,file handling
etc.
2) C as a system programming language

 C language is a system programming


language because it is generally used to
create hardware devices, OS, drivers,
kernels, etc. For example, Linux kernel is
written in C.
 It can't be used for internet programming
like Java, .Net, PHP, etc.
3) C as a procedural language

 A procedural language specifies a series


of steps for the program to solve the
problem.
 A procedural language breaks the program
into functions, data structures, etc.
 C is a procedural language. In C, variables
and function prototypes must be declared
before being used.
4)C as a structured programming language

 A structured programming language is a


subset of the procedural
language. Structure means to break a
program into parts or blocks so that it
may be easy to understand.
 In the C language, we break the program
into parts using functions. It makes the
program easier to understand and modify.
5) C as a mid-level programming language

 C is considered as a middle-level language


because it supports the feature of both low-
level and high-level languages. C language
program is converted into assembly code, it
supports pointer arithmetic (low-level), but it
is machine independent (a feature of high-
level).
Why C is popular??
 C is one of the foundations for modern
information technology (IT) and computer
science (CS).
 C is the most commonly used programming

language in industry.
C is one of the most commonly used
programming languages in colleges and
universities.
 C is the base for almost all popular programming

languages

5
Application of C Programming

 C language is used for creating computer


applications
 Used in writing Embedded softwares
 Firmware for various electronics, industrial and
communications products which use micro-controllers.
 It is also used in developing verification software,
test code, simulators etc. for various applications
and hardware products.
 For Creating Compiles of different Languages which
can take input from other language and convert it into
lower level machine dependent language.
 C is used to implement different Operating System
Operations.
List of Applications of C Programming

 List of Application
 Operating Systems
 Network Drivers
 Compilers
 Assemblers
 Text Editors
 Language Interpreters
 Simulators
 Embedded System
Which level is C language
belonging to ?
 There are 3 types of languages:
1. High level languages
2. Middle level language //C is middle level language
3. Low level languages
 A Low-level language is specific to one machine, i.e.,
machine dependent. It is machine dependent, fast to run. But
it is not easy to understand.
 A High-Level language is not specific to one machine, i.e.,

machine independent. It is easy to understand.


 A Middle level language C is called middle-level
language because it actually binds the gap between a
machine level language and high-level languages. A user
can use c language to do System Programming (for writing
operating system) as well as Application Programming (for
Contd…
Contd…
 The main difference between high level
language and low level language is that,
Programmers can easily understand or interpret or
compile the high level language in comparison of
machine.
 On the other hand, Machine can easily understand the
low level language in comparison of human beings.
 A computer understands instructions in machine code,
i.e. in the form of 0s and 1s. It is a tedious task to write
a computer program directly in machine code.
 Examples of high level languages are C, C++, Java,
Python, etc.
What are translators/language
processors?

 A translator that is used to translate the


program written in high-level language into
machine code is called language
translator/Language Processor
 The language processors can be any of the
following three types:
 1.Interpreter
 2.Assembler
 3.Compiler
Contd…
List of C compilers for windows OS

 There is various compiler of C & C++ language for


windows that are given below:
 CCS C Compiler
 Turbo C
 Minimalist GNU for Windows (MinGW)
 Portable C Compiler
 Clang C++
 Digital Mars C++ Compiler
 Intel C++
 IBM C++
 Visual C++ : Express Edition

Features of C Language

1. Simple
2. Machine Independent or Portable
3. Mid-level programming language
4. structured programming language
5. Rich Library
6. Memory Management
7. Fast Speed
8. Pointers
9. Recursion
10. Extensible
Contd…(Features of C
Language)
1) Simple - C is a simple language in the sense that it provides
a structured approach (to break the problem into parts), the
rich set of library functions, data types, etc.

2) Machine Independent or Portable - Unlike assembly language, c


programs can be executed on different machines with some
machine specific changes. Therefore, C is a machine
independent language.

3) Mid-level programming language - Although, C is intended to


do low-level programming. It is used to develop system
applications such as kernel, driver, etc. It also supports the
features of a high-level language. That is why it is known as
mid-level language.
Contd…(Features of C
Language)
4) Structured programming language - C is a
structured programming language in the sense that we
can break the program into parts using
functions. So, it is easy to understand and modify.
Functions also provide code reusability.
5) Rich Library - C provides a lot of inbuilt
functions that make the development fast.
6) Memory Management - It supports the feature
of dynamic memory allocation. In C language, we
can free the allocated memory at any time by calling
the free() function.
7) Speed - The compilation and execution time of C
language is fast since there are lesser inbuilt functions
and hence the lesser overhead.
Contd…(Features of C
Language)
8) Pointer -C provides the feature of pointers. We
can directly interact with the memory by using
the pointers. We can use pointers for
memory, structures, functions, array, etc.
9) Recursion -In C, we can call the function
within the function. It provides code
reusability for every function. Recursion enables
us to use the approach of backtracking.
10) Extensible -C language is extensible because
it can easily adopt new features.
Thank You

You might also like