CC 112 Programming Fundamentals
Nazar Khan

Programming is the art of designing and developing solutions to computational problems. This course covers the fundamental methods of thinking programmatically and writing clean, efficient code.

CC 112 is an undergraduate course worth 3 credit hours.

Lectures: Monday and Wednesday, 8:15 a.m. - 9:45 a.m. in Room 5, FCIT Old Campus
Office Hours: Monday, 2:30 p.m. - 3:30 p.m.
Google Classroom: https://classroom.google.com/c/NjU2NzA1OTg0MzI3?cjc=yaigmay

Grading:

Assignments

25%

Mid-Term

35%

Final

40%

Text

  1. DD: C: How to program with an introduction to C++ (Global edition, 8th edition) by Paul Deitel and Harvey Deitel

Lectures

#

Topics

Readings

Miscellaneous

1

The 4 Point Lecture [Video]

Introduction to Computers

  • Introduction
  • Hardware and Software
    • Moore's Law
    • Computer Organization
  • Data Hierarchy
  • Machine Languages, Assembly Languages and High-Level Languages

DD 1.1 -- 1.4

2

The C Programming Language

  • The C Programming Language
  • C Standard Library
  • C++ and Other C-Based Languages
  • Typical C Program-Development Environment

DD 1.5 -- 1.10

3

Introduction to C Programming - I

  • Typical Structure of C Program
  • Example 1: Printing a line of text
  • Example 2: Adding two integers

DD 2.1 -- 2.4

4

Introduction to C Programming - II

  • Arithmetic Operators
  • Operator Precedence
  • Relational Operators

DD 2.5 -- 2.6

Assignment 1

5-8

Structured Program Development in C

  • Algorithms and pseudocode
  • Control structures
    1. Sequence
    2. Selection
    3. Repetition
  • Arithmetic assignment operators
  • Increment/decrement operators

DD 3.1 -- 3.12

Assignment 2

9-13

Program Control in C

  • The for loop
  • The switch statement
  • The do ... while loop
  • The break and continue statements
  • Logical operators
  • Assignment vs. Equality

DD 4.4 -- 4.11

Assignment 3

14-16

Functions in C

  • Modularization
  • Function Prototypes
  • Function Call Stacks
  • Headers
  • Passing by Value vs. Reference

DD 5.1 -- 5.9

Mid-term Exam

17-18

Random Number Generation

  • rand()
  • srand()
  • enum

DD 5.10 -- 5.11

Assignment 4

19-20

Storage Classes and Scope Rules

  • Compiling with multiple source files
  • Storage classes
  • Scope rules

DD 5.12 -- 5.13

21

Recursion

  • Recursive factorial function
  • Fibonacci sequence
  • Recursion vs. iteration

DD 5.14 -- 5.16

Assignment 5

22-25

Arrays

  • Initializing 1D arrays
  • Applications
  • Passing arrays as arguments
  • Sorting
  • Searching
  • Multidimensional arrays
  • Variable length arrays

DD 6.1 -- 6.12

Assignment 6

26-28

Pointers

  • Defining and initializing
  • Pointer operators & and *
  • Passing by reference
  • const
  • sizeof
  • Pointer expressions and arithmetic
  • Pointers and arrays
  • Arrays of pointers
  • Pointers to functions

DD 7.1 -- 7.12

Assignment 7

29

Structures

DD 10.1 -- 10.7, 10.9, 10.10

30

Files

  • Files and streams
  • Sequential-access files
  • Random-access files

DD 11.1 -- 11.7

Assignment 8

31

The C Preprocessor

DD 13.1 -- 13.6, 13.10

Final Exam