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

1. WIMS 2021_COMPUTER PROGRAMMING_HANDOT

The document is a course handout for the Computer Programming course (CSIW ZC142) at BITS Pilani, detailing the syllabus, objectives, and learning outcomes. It covers fundamental programming concepts, data types, control structures, and file handling, primarily using the C programming language. The course aims to equip students with problem-solving skills and programming methodologies through theoretical lectures and practical lab exercises.

Uploaded by

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

1. WIMS 2021_COMPUTER PROGRAMMING_HANDOT

The document is a course handout for the Computer Programming course (CSIW ZC142) at BITS Pilani, detailing the syllabus, objectives, and learning outcomes. It covers fundamental programming concepts, data types, control structures, and file handling, primarily using the C programming language. The course aims to equip students with problem-solving skills and programming methodologies through theoretical lectures and practical lab exercises.

Uploaded by

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

BIRLA INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI

WORK-INTEGRATED LEARNING PROGRAMMES DIVISION


BITS-WIPRO Collaborative Program
Second Semester 2021-2022

COMPTER PROGRAMMING

COURSE HANDOUT

Course Title
CSIW ZC142:Computer Programming

Course Description
The course covers the following topics through lectures:
 Basic Model of a Computer; Problem Solving – Basic Computing Steps and Flow
Charting (Assignment, Sequencing, Conditionals, Iteration). Programming Constructs –
Expressions, Statements, Conditionals, Iterators/Loops, Functions/Procedures; Data
Types – Primitive Types, Tuples, Choices (Unions or Enumerations), Lists/Arrays,
Pointers and Dynamically Allocated Data. Input output and Files.
 While the topics are taught using a specific language, the intent of the course is to
teach a programming methodology not a programming language. There is also a
laboratory component that involves development and testing of iterative and procedural
programs using bounded and unbounded iterations, function composition, random access
lists, sequential access lists, dynamically allocated lists, and file access.

Course Objectives

No Course Objective

CO1 Serves as an introductory course in computer programming.To learn basic principles of


Problem solving.

CO2 To understand techniques for specifying data and operations on data using a
programming language

CO3 To understand and explore systematic techniques and approaches for constructing
programs.

Text Books
No Author(s), Title, Edition, Publishing House
T1 J.R. Hanly and E.B. Koffman, Problem Solving and Program Design in C. 5th Edition.
Pearson Education 2007
Reference Books
No Author(s), Title, Edition, Publishing House
R1 J. B. Dixit, Programming in C, Third Edition, Firewall Media © 2010
R2 Brian W. Kernighan, Dennis Ritchie, The C Programming Language. Prentice Hall. 2nd
Edition.
R3 E Balaguruswamy, Programming in ANSI C, 4th Edition, Tata McGraw-Hill Education, 2008

Legend
M = Module, RL = Recorded Lecture, CS = Contact Session, LE = Lab Exercises, SS = Self Study,
HW = Home Work Problems
Modular Content Structure

1. Introduction: Computers and Programming


1.1. Introduction
1.1.1. Computers and Programming,
1.1.2. Programming Languages Types,
1.1.3. Problem solving
1.2. Number systems and Representations,
1.2.1. Decimal and Binary number representations,
1.2.2. Unsigned Binary number representation and arithmetic
1.2.3. Signed Binary representations (Signed Magnitude, 1’s Comple-
ment, 2’s Complement)
1.2.4. Signed Binary Numbers: Arithmetic (Overflow, Sign Extension)
1.2.5. Character representations
1.2.6. Data types
2. Elements of C Language
2.1. Getting started with C
2.1.1. Structure of a C program,
2.1.2. Program compilation and execution in gcc
2.1.3. Data types in C
2.1.4. Operators & Expressions
2.1.5. Expression Evaluation
2.1.6. Operator Precedence & Associativity
2.1.7. Operator Typecasting
3. Top Down Design using Functions
3.1. Basic Concepts
3.2. Library Functions
3.3. Top-Down Design and Structure Charts
3.4. Functions without Arguments
3.5. Functions with Input Arguments
3.6. Storage classes
3.7. Introduction to pointers
3.7.1. Formal Output Parameters as Actual Arguments
4. Conditional Constructs
4.1. Sequential and Conditional Execution
4.2. The if Statement
4.3. if Statements with Compound Statements(if else)
4.4. if—else –if statement
4.5. switch—case statement
5. Iterative Constructs
5.1. Introduction to Iterative constructs and Flow charting
5.2. Iterative statements in C Language: for
5.3. Iterative statements in C Language: while
5.4. Iterative statements in C Language: do-while
5.5. Introduction to Recursion
5.6. Recursion vs. Iteration
6. Random Access Lists: Arrays
6.1. Integer Arrays: Indexing, Iterating
6.2. Character Arrays
6.3. Strings and operations
6.4. Searching in the list: Linear search & Binary search
6.5. Ordering the list: Bubble sort, Selection sort ,Insertion Sort
6.6. Two Dimensional List representations and Operations
7. Abstract Data Types: Structure & Union
7.1. User defined Data types : Structure Data type
7.2. User defined Data types :Union
7.3. Problem Solving with Structure Types
8. Pointers and Linked Lists
8.1. Introduction to Pointers
8.2. Pointer Arithmetic
8.3. Pointers to Structures
8.4. Arrays and Pointers
8.5. Dynamic Memory Allocation
8.6. Pass by Reference
8.7. Linked List: Implementation of Linked List,
8.8. Operations on Linked List: Search, Delete, Insert Swap-Space Management
9. File Handling
9.1. Introduction to File I/O,
9.2. Basic File operations
9.3. Command line arguments
9.4. Text File Processing
Learning Outcomes:

No Learning Outcomes

LO1 Student should be able to have fundamental knowledge on basics of computers


hardware and number systems.

LO2 Student should be able to understand the basic terminology used in computer
programming

LO3 Student should be able to write, compile and debug programs in C language and use
different data types in a computer program

LO4 Student should be able to design simple programs involving decision structures, loops
and functions, understand the dynamics of memory by the use of pointers.

LO5 Student should understand basics of pointers and be able to use different data structures
and create/update basic data files.

M1: Introduction: Computers and Programming

Type Description/Plan/Reference
RL1.1 Computers and Programming, Programming Languages Types, Problem solving
LE1.1 Introduction (Computing Machine, Operating System, UNIX)
SS1.1 R1: Chapter 1, T1: Section 1.2 – 1.5
CS-1 Subject overview, handout discussion and review of RL1
Computers and Programming, Programming Languages Types, Problem solving
HW1.1 T1:Chapter 1: Review questions

M2: Number Systems and Representation

Type Description/Plan/Reference
RL1.2 Number systems and Representations, Decimal and Binary number representations,
Unsigned Binary number representation and arithmetic
RL1.3 Signed Binary representations (Signed Magnitude, 1’s Complement, 2’s Complement)
Signed Binary Numbers: Arithmetic (Overflow, Sign Extension)
Character representations, Data types
LE1.1 Signed Binary representations (Signed Magnitude, 1’s Complement, 2’s Complement)
Signed Binary Numbers: Arithmetic (Overflow, Sign Extension)
Character representations, Data types
SS1.1 R1: Chapter 1, T1: Section 1.2 – 1.5
CS-2 Decimal and Binary number representations, Unsigned Binary number representation
and arithmetic Signed Binary representations (Signed Magnitude,1’sComplement,2’s
Complement), Signed Binary Numbers: Arithmetic (Overflow, Sign Extension),Char-
acter representations ,Data types.
HW1.1 T1:Chapter 1: Review questions

M3: Elements of C Language (Getting Started with C)

Type Description/Plan/Reference
RL2.1 Structure of a C program, Program compilation and execution in gcc
RL2.2 Data types in C, Operators & Expressions, Expression Evaluation
RL2.3 Operator Precedence & Associativity, Operator Typecasting
CS-3 Structure of a C program,
Program compilation and execution in gcc
Data types in C
Operators & Expressions
Expression Evaluation
Tips and common programming errors
Programming examples and exercise
LE2.1 Getting started with C, Compiling executing your program, Expression Evaluation
SS2.1 R1: Chapter 3, T1: Section 2.7, 2.8
HW2.1 T1 Chapter 2: Programming Projects 3, 4,5, 12 and 13

M 4: Top Down Design using Functions

Type Description/Plan/Reference
RL3.1 Modularity in Programming, Modular Programming in C using Functions/Procedures
RL3.2 Designing Functions in C: Argument Identification, Return Value, Pre-condition(s) and
Post-condition(s); Argument List Correspondence; Function with no Arguments
CS-4 Brief Overview on RL3.1 and RL3.2, Problem Solving on Function Design, T1: Section
3.2, Section 6.5
LE3.1 Modular Programming using Functions
SS3.1 T1: Chapter 6
HW3.1 T1: Chapter 3: Programming Projects 4, 6, 9, 10, 11

M5: Problem Solving: Conditional Constructs

Type Description/Plan/Reference
RL4.1 Problem Solving: Sequential and Conditional constructs, if, if-else, Flow charting
CS-5 Sequential and Conditional Execution .The if Statement ,if Statements with
Compound Statements(if else)
LE4.1 Programming with conditional constructs
SS4.1 R1: Chapter 5: Section “Conditional Statements Selection”
HW4.1 T1: Chapter 4: Programming Projects 1, 6, 7, 11

M6: Problem Solving: Conditional Constructs


Type Description/Plan/Reference
RL4.2 Conditional constructs to handle multiple branches, if—else –if , switch—case
CS-6 if—else –if statement switch—case statement. Tips and common programming errors
Programming examples and Exercise
LE4.1 Programming with conditional constructs
SS4.1 R1: Chapter 5: Section “Conditional Statements Selection”
HW4.1 T1: Chapter 4: Programming Projects 1, 6, 7, 11

M7: Problem Solving: Iterative Constructs

Type Description/Plan/Reference
RL5.1 Problem Solving: Iterative constructs, Flow charting
RL5.2 Iterative statements in C Language: for, while
CS-7 Introduction to Iterative constructs and Flow charting .Iterative statements in
C Language: for Iterative statements in C Language: whil
CS5.2 Brief Overview on RL5.3, T1: Section 10.1- 10.3, 10.6, Problem solving on recursive
functions
LE5.1 Programming with iterative constructs
SS5.1 R1: Chapter 5: Section “Loops or Repetition or Iterations”
HW5.1 T1: Chapter 5: Programming Projects 2, 5, 6, 12; Chapter 7 Programming Projects 1, 2, 5
Chapter 10: Programming Projects 3, 4
M8: Problem Solving: Iterative Constructs

Type Description/Plan/Reference
RL5.2 Iterative statements in C Language: do-while
CS-8 Iterative statements in C Language: do-while
Introduction to Recursion, Recursion vs. Iteration, Tips and common programming errors
Programming examples and Exercises
CS5.2 Brief Overview on RL5.3, T1: Section 10.1- 10.3, 10.6, Problem solving on recursive
functions
LE5.1 Programming with iterative constructs
SS5.1 R1: Chapter 5: Section “Loops or Repetition or Iterations”
SS 5.2 Recursion Vs Iteration
HW5.1 T1: Chapter 5: Programming Projects 2, 5, 6, 12; Chapter 7 Programming Projects 1, 2, 5
Chapter 10: Programming Projects 3, 4

M9: Random Access Lists: Arrays

Type Description/Plan/Reference
RL6.1 Random access lists and operations, Integer Arrays: Indexing, Iterating
RL6.2 Character Arrays, Strings and operations
RL6.3 Searching in the list: Linear search & Binary search, Ordering the list: Bubble sort,
Merge sort
CS-9 Integer Arrays: Indexing, Iterating, Character Arrays, Strings and operations, Searching
in the list: Linear search & Binary search, Ordering the list: Bubble sort, Selection sort,
Insertion Sort.
LE6.1 Programming with arrays
SS6.1 R1: Chapter 8: Section “One Dimensional Array”
SS6.2 R1: Chapter 9: Section “Strings Handling Functions”, “Arithmetic Operations on
Characters”
HW6.1 T1: Chapter 8: Programming Projects 1, 2, 3, 4, 6, 11, 12

M 10: Random Access Lists: Arrays

Type Description/Plan/Reference
RL6.4 Two Dimensional List representations and Operations
CS-10 Two Dimensional List representations and Operations, Tips and common programming
errors
Programming examples and Exercises
LE6.1 Programming with arrays
SS6.3 R1: Chapter 8: Section “Two Dimensional Array”, “Multi-dimensional Array”
HW6.1 T1: Chapter 8: Programming Projects 1, 2, 3, 4, 6, 11, 12

M11: Abstract Data Types: Structure & Union

Type Description/Plan/Reference
RL7.1 User defined Data types, Structure Data type
RL7.2 Problem solving using Structures and Union
CS-11 Brief Overview on on recorded lectures on Module 7. Nested Structures, Problem solving
on structure and union types, T1 Section 11.4
LE7.1 Programming with structures and unions
SS7.1 R1: Chapter 11
HW7.1 T1: Chapter 11: Programming Projects 1, 2, 3

M12: Pointers and Linked Lists

Type Description/Plan/Reference
RL8.1 Introduction to Pointers, Pointer Arithmetic, Pointers to Structures
CS-12 Introduction to Pointers, Pointer Arithmetic, Pointers to Structures, Tips and
common programming errors, Programming examples and Exercise
LE8.1 Programming with pointers and dynamic memory allocation
SS8.1 R1: Chapter 10
HW8.1 T1: Chapter 14: Programming Projects 6, 7

M13: Pointers and Linked Lists

Type Description/Plan/Reference
RL8.2 Arrays and Pointers, Dynamic Memory Allocation, Pass by Reference
CS-13 Arrays and Pointers, Dynamic Memory Allocation, Pass by Reference, Linked List: Im-
plementation of Linked List
LE8.1 Programming with pointers and dynamic memory allocation
SS8.1 R1: Chapter 10
HW8.1 T1: Chapter 14: Programming Projects 6, 7
LE8.1 Programming with pointers and dynamic memory allocation
SS8.1 R1: Chapter 10
HW8.1 T1: Chapter 14: Programming Projects 6, 7

M14: Pointers and Linked Lists

Type Description/Plan/Reference
RL8.3 Linked List, Implementation of Linked List, Operations on Linked List: Search, Delete,
Insert
CS-14 Operations on Linked List: Search, Delete, Insert Tips and common programming
errors
Programming examples and Exercises
LE8.1 Programming with pointers and dynamic memory allocation
SS8.1 R1: Chapter 10
HW8.1 T1: Chapter 14: Programming Projects 6, 7
LE8.1 Programming with pointers and dynamic memory allocation
SS8.1 R1: Chapter 10
HW8.1 T1: Chapter 14: Programming Projects 6, 7

M15: File Handling

Type Description/Plan/Reference
RL9.1 File I/O, Basic File operations
RL9.2 Command line arguments, Text File Processing
CS-15 Brief Overview on RL9.1 and 9.2, Problem solving on text file processing, T1: Section
12.3
LE9.1 Programming with file processing
SS9.1 R1: Chapter 12, T1: Section 12.1
HW9.1 T1: Chapter 12: Programming Projects 1, 4, 6

M16: File Handling

Type Description/Plan/Reference
RL9.1 File I/O, Basic File operations
RL9.2 Command line arguments, Text File Processing
CS-16 Programming examples and Exercise,Review and revision of all topics
LE9.1 Programming with file processing
SS9.1 R1: Chapter 12, T1: Section 12.1
HW9.1 T1: Chapter 12: Programming Projects 1, 4, 6

Course Plan:

Sl. No RL CS SS HW LE
1 RL 1.1,1.2,1.3 CS – 1&CS 2
2 RL 2.1,2.2,2.3 CS-3 SS1.1 HW1.1, HW2.1 LE1.1, LE2.1
3 RL 3.1 No session
4 RL 3.2 CS-4 SS 2.1 HW 3.1 LE 3.1

5 RL 4.1 CS-5
6 RL 4.2 CS-6 SS 3.1 HW 4.1 LE 4.1

7 RL 5.1,5.2 CS-7
8 RL 5.3 CS-8 SS 4.1 HW 5.1 LE 5.1

Mid semester examination


9 RL 6.1, 6.2 CS-9
10 RL 6.3, 6.4 CS-10 SS 5.1 HW 6.1 LE 6.1

11 RL 7.1 CS-11
RL 7.2 CS-11 SS 6.1 HW 7.1 LE 7.1

12 RL 8.1 CS-12
13 RL 8.2 CS-13 SS 7.1 HW 8.1 LE8.1

14 RL 8.3 CS-14
15 RL 9.1 9.2 CS -15
16 CS-16 SS 8.1 HW 9.1 LE9.1

You might also like