0% found this document useful (0 votes)
71 views27 pages

History and Importance of C

Module 01 introduces the fundamentals of C programming, covering program design tools, variable declarations, data types, and the history and significance of the C language. It outlines the course objectives and outcomes, emphasizing the design of algorithms for computational problems. The document also details the installation process for Turbo C++ and the flow of a C program from source code to execution.
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)
71 views27 pages

History and Importance of C

Module 01 introduces the fundamentals of C programming, covering program design tools, variable declarations, data types, and the history and significance of the C language. It outlines the course objectives and outcomes, emphasizing the design of algorithms for computational problems. The document also details the installation process for Turbo C++ and the flow of a C program from source code to execution.
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/ 27

Module 01

Mrs. Bhargavi Dalal


Road Map of Module 1
• Program Design Tools: Art of
Programming through Algorithms,
Flowcharts.
• Overview of C:
• Declaration of variables,
• History and importance C,
• Storage Class,
• Character Set,
• Assigning Values to variables,
• C Tokens,
• Defining Symbolic Constants,
• Keywords and Identifiers,
• declaring a Variable as Constant,
• Constants,
• Declaring a Variable as Volatile
• Variables,
• Data types,
Course Objective and Outcome
• Course Objective
• To understand the fundamental Concepts of C Programming.

• Course Outcome
• To Design algorithms for simple computational problems.

• what is a computational problem?


• A computational problem is a problem that can be solved step-by-step with a
computer.
• These problems usually have a well-defined input, constraints, and conditions
that the output must satisfied.
Types of computational problems
• A decision problem is one where the answer is yes or no.
• For instance, "given a number n, is n even?" is a decision problem.
• Some decision problems take more steps to solve than others.
• For instance, "given a number n, is n prime?" takes more steps than just checking the
parity of a number.
• A search problem is one where the solution consists of one or more values that
satisfies a given condition.
• For instance, we may want to compute a path from one geographical location to another
on a map.
• A counting problem is one where the answer is the number of solutions to a search
problem.
• An optimization problem is one where the solution is the "best" possible solution,
where the "best" can be defined in a different way.
• For instance, we may want to compute the fastest route from one location to another.
Why C Language consider as mother of all
language?
• COBAL – Commercial/ Business Purpose
• FORTRAN – Scientific Application
• ALGOL60 – it never become popular
• CPL – (Combined Programming Language) – Very Complex
• BCPL – (Basic Programming Language) – Less Powerful
• B – insufficient
• C – Compact and Coherent
• 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 array, strings, functions, file handling, etc. that are
being used in many languages like C++, Java, C#, etc.
History of C Language
• History of C language is interesting to know.
• C programming language was developed in 1972
by Dennis Ritchie at bell laboratories of AT&T
(American Telephone & Telegraph), located in the
U.S.A.
• Dennis Ritchie is known as the founder of the c
language.
• It was developed to overcome the problems of
previous languages such as B, BCPL, etc.
• Initially, C language was developed to be used in
UNIX operating system.
• It inherits many features of previous languages
such as B and BCPL.
• Let's see the programming languages that were
developed before C language.
Features of C Language
• C is the widely used language.
• It provides many features that are given below.
• 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.
• 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.
• 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.
Importance of C Language
1. Rich set of built in functions.
2. Operators can be used to write any complex program.
3. The c Program combine the capabilities of an assembly language with the feature of high
level language.
4. It is well suited for writing both system software and business packages.
5. Due to variety of data type and powerful operators program written in C are efficient and
fast.
6. For Exa. A program to increment a variable from in C lang. takes about 1 Second, while it
takes almost 50 seconds in BASIC.
7. There are only 32 keywords in American National Standards Institute (ANSI) C, the
strength of C lies in its built-in functions.
8. C is highly portable: the programs written for one computer can be run on another
compute easily.
9. C is well suited for structured programming. The modular structure makes program
debugging, testing and maintenance easier.
10. Ability to extends itself: we can add our own function to C library.
What is a programming language?
• Computer Program – It often simply referred to as software, is a set of
instruction that tells a computer how to perform a specific task or serries
of tasks.
• These instruction are written in a programming language and are executed
by the computer hardware.
• Programs can range from simple scripts that automate repetitive tasks to
complex applications that power modern technology.
• A programming language defines a set of instructions that are compiled
together to perform a specific task by the CPU (Central Processing Unit).
• The programming language mainly refers to high-level languages such as
C, C++, Pascal, Ada, COBOL, etc.
C can be defined by the
following ways:
1.Mother language
2.System programming language
3.Procedure-oriented programming language
4.Structured programming language
5.Mid-level programming language
How to install C?
• There are many compilers available for c and c++.
• You need to download any one.
• Here, we are going to use Turbo C++.
• It will work for both C and C++.
• To install the Turbo C software, you need to follow following steps.

1. Download Turbo C++


2. Create turboc directory inside c drive and extract the tc3.zip inside c:\turboc
3. Double click on install.exe file
4. Click on the tc application file located inside c:\TC\BIN to write the c
program
Steps to follow
• It will ask you to install c or not, press enter to install.
• Change your drive to c, press c.
• Press enter, it will look inside the c:\turboc directory for the required files.
• Select Start installation by the down arrow key then press enter.
• Now C is installed, press enter to read documentation or close the software.
• Now double click on the tc icon located in c:\TC\BIN directory to write the
c program.
• In windows 7 or window 8, it will show a dialog block to ignore and close
the application because fullscreen mode is not supported. Click on Ignore
button.
• Now it will showing following console.
File: main.c
#include <stdio.h>
int main() {
printf("Hello World!\n");
return 0;
}

Output:
Hello World!
Flow of C Program
1. C program (source code) is sent to preprocessor first. The preprocessor is
responsible to convert preprocessor directives into their respective values.
The preprocessor generates an expanded source code.
2. Expanded source code is sent to compiler which compiles the code and
converts it into assembly code.
3. The assembly code is sent to assembler which assembles the code and
converts it into object code. Now a simple.obj file is generated.
4. The object code is sent to linker which links it to the library such as header
files. Then it is converted into executable code. A simple.exe file is
generated.
5. The executable code is sent to loader which loads it into memory and then
it is executed. After execution, output is sent to console.
Thank You
Bhargavi Dalal

You might also like