Unit 1 - 18CSS101J Programming for Problem Solving, Slides of Programming for Engineers

Detailed Lecture Slides for the curriculum and syllabus prescribed for the academic Term Unit 1 - 18CSS101J

Typology: Slides

2017/2018

Uploaded on 02/20/2022

vasundhara-jhobta
vasundhara-jhobta 🇺🇸

4.6

(8)

8 documents

1 / 162

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
18CSS101J–ProgrammingforProblemSolving
UnitI
SRM
INSTITUTE OF SCIENCE AND TECHNOLOGY,
CHENNAI.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Unit 1 - 18CSS101J Programming for Problem Solving and more Slides Programming for Engineers in PDF only on Docsity!

18CSS101J – Programming for Problem Solving

Unit I

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

COURSE LEARNING RATIONALE (CLR)

The purpose of learning this course is to:

CLR -1:

Think and evolve a logically to construct an algorithm into a flowchart and a pseudocode that can be programmed

CLR -2:

Utilize the logical operators and expressions to solve problems in engineering and real-time

CLR -3: Store and retrieve data in a single and multidimensional array

CLR -4:

Utilize custom designed functions that can be used to perform tasks and can be repeatedly used in any application

CLR -5:

Create storage constructs using structure and unions. Create and Utilize files to store and retrieve information

CLR -6:

Create a logical mindset to solve various engineering applications using programming constructs in C

LEARNING RESOURCES S. No (^) TEXT BOOKS

Zed A Shaw, Learn C the Hard Way: Practical Exercises on the Computational

Subjects You Keep Avoiding (Like C), Addison Wesley, 2015

W. Kernighan, Dennis M. Ritchie, The C Programming Language, 2nd ed.

Prentice Hall, 1996

3. Bharat Kinariwala, Tep Dobry, Programming in C, eBook

4. http://www.c4learn.com/learn-c-programming-language/

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

UNIT I

INTRODUCTION

Evolution of Programming & Languages - Problem Solving

through Programming - Creating Algorithms - Drawing

Flowcharts - Writing Pseudocode - Evolution of C language, its

usage history - Input and output functions: Printf and scanf -

Variables and identifiers – Expressions - Single line and

multiline comments - Constants, Keywords - Values, Names,

Scope, Binding, Storage Classes - Numeric Data types: integer -

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

1. 1 Evolution of Programming & Languages

q A Computer needs to be given instructions in a programming

language that it understands

q Programming Language
q Artificial language that controls the behavior of computer
q Defined through the use of syntactic and semantic rules
q Used to facilitate communication about the task of organizing

and manipulating information

q Used to express algorithms precisely

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

1. 2 Problem Solving through Programming

q Problem - Defined as any question, something involving doubt,

uncertainty, difficulty, situation whose solution is not immediately obvious

q Computer Problem Solving
q Understand and apply logic
q Success in solving any problem is only possible after we have

made the effort to understand the problem at hand

q Extract from the problem statement a set of precisely defined

tasks

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

1. 2 Problem Solving through Programming Contd…

i. Creative Thinking
q Proven method for approaching a challenge or opportunity in

an imaginative way

q Process for innovation that helps explore and reframe the

problems faced, come up with new, innovative responses and solutions and then take action

q It is generative, nonjudgmental and expansive
q Thinking creatively, a lists of new ideas are generated

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

1. 2 Problem Solving through Programming Contd…

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

1. 2 Problem Solving through Programming Contd…

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

q Program - Set of instructions that instructs the computer to do a

task

q Programming Process
a) Defining the Problem
b) Planning the Solution
c) Coding the Program
d) Testing the Program
e) Documenting the Program

1. 2 Problem Solving through Programming Contd…

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

q A typical programming task can be divided into two phases:
i. Problem solving phase
q Produce an ordered sequence of steps that describe solution

of problem this sequence of steps is called an Algorithm

ii. Implementation phase
q Implement the program in some programming language
q Steps in Problem Solving
a) Produce a general algorithm (one can use pseudocode )

1. 2 Problem Solving through Programming Contd…

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

b) Refine the algorithm successively to get step by step detailed

algorithm that is very close to a computer language

c) Pseudocode is an artificial and informal language that helps

programmers develop algorithms

q Pseudocode is very similar to everyday English

1. 3 Creating Algorithms Contd…

q What are Algorithms for?
q A way to communicate about your problem/solution with

others

q A possible way to solve a given problem
q A "formalization" of a method, that will be proved
q A mandatory first step before implementing a solution
q Algorithm Definition - “A finite sequence of unambiguous,

executable steps or instructions, which, if followed would ultimately terminate and give the solution of the problem”

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.

1. 3 Creating Algorithms

q Notations
q Starting point
q Step Numbers – Positions in Algorithm
qIncoming Information - Input
q Control Flow – Order of evaluating Instructions
q Statements
q Outgoing Information - Output
q Ending Point

INSTITUTE OF SCIENCE AND TECHNOLOGY,

CHENNAI.