You are on page 1of 12

AST 103

Programming with C/C++


Lecture-01: Discussion on Programming Language
Tahmina Akter
Email:
takter2@isrt.ac.bd
Lecturer of Applied Statistics,
Institute of Statistical Research and
Training (ISRT), University of Dhaka,
Bangladesh.

January, 2018
ogramming with
Computer
Computers can perform calculations and make logical
decisions phenomenally faster than human beings can.
Today’s personal computers can perform billions of
calculations in one second—more than a human can
perform in a lifetime.
Hardware and Software
 The programs that run on a computer are referred to as software.
 A computer consists of various devices referred to as hardware
 (e.g., the keyboard, screen, mouse, hard disks, memory, DVD
drives and processing units).
 Computing costs are dropping dramatically, owing to rapid
developments in hardware and software technologies.
Programming
Programming is the process of taking an algorithm and encoding
it into a notation, a programming language, so that it can be
executed by a computer. Although many
programming languages and many different types of computers
exist, the important first step is the need to have the solution .
Introduction

Programming Languages

Programming with C: Lecture-01


Introduction

To complete any task on computer,


what should we do?

1
Need to give instructions

A programming is nothing but a set of instructions


Introduction cont.
.

Lets start with a simple example.

Evaluate the value (without using any


program) of
1 + 2 + · · · + 100
=(1 + 2) + 3 + · · · + 100
=(3 + 3) + 4 + · · · + 100

There are two important things here:


 an algorithm of adding the value with the immediately previous one.
 flow through this algorithm until we reach to the end.

Programming with C: Lecture-01


Introduction
cont. .
Now let us consider few abstruse problems

(exp1+2+···+100) + (exp2+3+···+101) + · · · + (exp100+101+···+200) exp(1)

+ exp(2) + · · · + exp(100)+………………

1 Why programming language?

Although a simple problem can be solved using manual technique, more


complicated or cumbersome one needs a greater afford beyond human ability
(literally)! Consequently, we need machines (e.g. calculator, computer) rather than
human to solve problems in an efficient way, and make our life easier!However,
human language is incomprehensible to machines.

Programming with C: Lecture-01


Introduction
cont. .

Programming language

A programming language is a formal constructed language designed


in such a way that is comprehensible to machine (computer).
1

Programming with C: Lecture-01


Code Blocks logo
Code Blocks open
Deitel, P. J. and Deitel, H. M.
(2012). C how to program.
Prentice Hall, 7th edition.

Programming with C: Lecture-01

You might also like