Course
Title: Programming Fundamentals
Course
Code: CMP-2122
Course
Structure: Lectures: 3 / Labs: 1
Credit
Hours: 4
Prerequisites:
None
Course
Objectives:
The course is designed to familiarize students with the basic
structured programming skills. It emphasizes upon problem analysis, algorithm
designing, and program development and testing.
Course
Syllabus:
·
Overview of Computer Programming.
·
Principles of
Structured and Modular Programming.
·
Overview of
Structured Programming Languages.
·
Algorithms
and Problem Solving.
·
Program
Development: Analyzing Problem,
Designing
Algorithm/Solution, Testing Designed Solution.
·
Translating
Algorithms into Programs.
·
Fundamental
Programming Constructs.
·
Data Types.
·
Basics of Input and Output.
·
Selection and Decision (If, If-Else, Nested If
Else, Switch Statement and
Condition Operator).
·
Repetition
(While and For
Loop, Do-While Loops), Break
Statement, Continues Statement.
·
Control
Structures.
·
Functions.
·
Arrays.
·
Pointers.
·
Records.
·
Files.
·
Testing & Debugging.
Course
Outline:
1.
Overview of
Computer Programming: Machine
Languages, Assembly Languages
and High-Level Languages, History
of C, C
Standard Library, Typical
C Program Development Environment,
Memory Concepts, Arithmetic
in C, Decision
Making: Equality and Relational Operators. [Ch. 1,2]
2.
Principles
of Structured and Modular Programming:
Algorithms, Pseudocode, Control Structures, The
if Selection Statement,
The if…else Selection
Statement, The while Repetition Statement,
Sentinel-Controlled
Repetition, Nested Control
Structures, Assignment Operators, Increment and Decrement Operators.
[Ch. 3]
3.
Program
Control: Repetition Essentials, Counter-Controlled Repetition, for loop,
switch Multiple-Selection
Statement, do…while Repetition
Statement, break and
continue Statements, Logical Operators, Confusing Equality (==) and
Assignment (=) Operators. [Ch. 4]
4.
Functions:
Function Definitions, Function Prototypes, Function Call Stack and Activation Records, Headers,
Calling Functions By
Value and By
Reference, Scope Rules, Recursion, Fibonacci Series, Recursion
vs. Iteration [Ch. 5]
5.
Arrays:
Defining Arrays, Array Examples, Passing Arrays to Functions, Sorting Arrays, Case Study:
Computing Mean, Median
and Mode Using
Arrays, Searching Arrays, Multiple-Subscripted Arrays [Ch. 6]
6.
Pointers:
Pointer Variable Definitions
and Initialization, Pointer
Operators, Passing Arguments to
Functions by Reference, Using the const Qualifier with Pointers, Bubble Sort Using
Call-by-Reference, sizeof Operator,
Pointer Expressions and
Pointer Arithmetic, Relationship between Pointers and Arrays, Arrays of Pointers, Case Study: Card
Shuffling and Dealing Simulation, Pointers to Functions. [Ch. 7]
7.
Characters and
Strings: Fundamentals of Strings
and Characters, Character-Handling Library, String-Conversion
Functions, Standard Input/Output Library Functions, String Manipulation Functions
of the String-Handling Library,
Comparison Functions of the
String-Handling Library, Search
Functions of the
String-Handling Library, Memory Functions of
the String-Handling Library,
Other Functions of
the String-Handling Library [Ch.
8]
8.
Formatted Input/Output: Streams, Formatting
Output with printf,
Printing Integers, Printing Floating-Point Numbers,
Printing Strings and
Characters, Other Conversion Specifiers, Printing with Field
Widths and Precision, Using Flags in the printf Format Control String, Printing
Literals and Escape Sequences, Reading Formatted Input with scanf. [Ch. 9]
9.
Structures, Unions,
Bit Manipulations and
Enumerations: Structure
Definitions, Initializing Structures,
Accessing Structure Members, Using Structures with Functions, typedef, Example: High-Performance Card Shuffling and Dealing Simulation, Unions, Bitwise
Operators, Bit Fields, Enumeration Constants. [ Ch. 10]
10.
File
Processing: Data Hierarchy, Files
and Streams, Creating a Sequential-Access File, Reading Data from a
Sequential-Access File, Random-Access Files, Creating a RandomAccess File, Writing
Data Randomly to
a Random-Access File,
Reading Data from a
Random-Access File. [Ch. 11]
Textbook(s):
·
C How to Program by Paul Deitel and Harvey
Deitel, Prentice Hall; 7th Edition (March 4, 2012)
Reference
Material:
·
Programming in C
by Stephen G.
Kochan, Addison-Wesley
Professional; 4 edition (September 25, 2013). ISBN-10:
0321776410
Note: This content is obtained from official documents of University of Sargodha and applied on BS Computer Science for Main Campus, Sub Campuses, and Affiliated Colleges.
0 comments:
Post a Comment