I B.Tech. CSM (Ai&Ml) : Programming For Problem Solving

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 29

I B.TECH.

CSM(AI&ML)

PROGRAMMING FOR
PROBLEM SOLVING
What is programming?
The planning, scheduling or
performing of a program.
What is a computer program?
A series of coded software instructions to control
the operation of a computer or other machine.
WHAT IS COMPUTER
PROGRAMMING?
 The process of telling a computer to do certain
things by giving it instructions.

 These instructions are called programs.

 The instructions come in different languages, they


are called programming languages.
WHAT IS C AND WHY SHOULD WE LEARN IT?

 C is a structured programming language.

 It was initially developed by Dennis Ritchie during early


1970s at Bell Laboratories.

 It was mainly developed as a system programming language to


write operating system.

 The main features of C language include low-level access to


memory, simple set of keywords, and clean style.

 These features make C language suitable for system


programming like operating system or compiler development.
COMPUTER SYSTEMS
Today computer systems are found everywhere.
Computers have become almost as common as
televisions.
But what is a computer?
A computer is a system made of two major components:
1. Computer Hardware
2. Computer Software
BASIC HARDWARE COMPONENTS
COMPUTER SOFTWARE
SYSTEM SOFTWARE

 System software consists of programs that


manage the hardware resources of a computer
and perform required information processing
tasks.
 These programs are divided into three classes:

1. Operating System
2. System support software
3. System development software
APPLICATION SOFTWARE
COMPUTING ENVIRONMENTS
In the early days of computers, there was only one
environment, the mainframe computer hidden in a central
computing department.

With the advent of minicomputers and personal computers,


the environment changed with computers on virtually every
desktop. In this section we describe several different
environments.

1. Personal Computing Environment


2. Time-Sharing Environment
3. Client/Server Environment
4. Distributed Computing
PERSONAL COMPUTING
ENVIRONMENT
TIME SHARING ENVIRONMENT
CLIENT/SERVER ENVIRONMENT
DISTRIBUTED COMPUTING
COMPUTER LANGUAGES
To write a program for a computer, we must use
a computer language. Over the years computer
languages have evolved from machine language
to natural languages.
1. Machine Languages
2. Symbolic Languages
3. High-Level Languages
COMPUTER LANGUAGE EVOLUTION
THE MULTIPLICATION PROGRAM IN MACHINE LANGUAGE
Note
The only language understood by computer
hardware is machine language.
THE MULTIPLICATION PROGRAM IN SYMBOLIC
LANGUAGE
Note
Symbolic language uses symbols, or mnemonics, to represent
the various machine language instructions.
HIGH LEVEL LANGUAGES
CREATING AND RUNNING
PROGRAMS

The following is the procedure for turning a program


written in C into machine language. The process is
in a straightforward, linear fashion, but these steps
are repeated many times during development to
correct errors and make improvements to the code.

1.Writing and Editing programs


2.Compiling programs
3.Linking programs
4.Executing programs
BUILDING A C PROGRAM
PROGRAM DEVELOPMENT

Program development is a multistep process that


requires-
1. Understanding the problem
2. Developing a solution
3. Writing the program
4. Testing the program
DEVELOPING THE SOLUTION
There are two basic ways to describe in detail of
any activity:
1) Pseudocode
English like statements that follow a loosely
defined syntax and are used to convey the design
of an algorithm.
2) Flowchart
A program design tool in which standard
graphical symbols are used to represent the logical
flow of data through a function.
ALGORITHM

Definition:
An algorithm is a specific procedure for solving a well-
defined computational problem.
FLOWCHART-SYMBOLS
ANSWER THE FOLLOWING
QUESTIONS

1. A series of coded software instructions to control


the operation of a computer or other machine is
called __________________.
2. C is developed by __________________.
3. C is a ____________ type of programming language.
4. The two major components of a computer are
_____________.
5. What are the two types of software?
6. The only language understood by computer
hardware is ___________________.
7. Name the different computing environments.

You might also like