Active Outline

General Information


Course ID (CB01A and CB01B)
CIS D26BH
Course Title (CB02)
Advanced C Programming - HONORS
Course Credit Status
Credit - Degree Applicable
Effective Term
Fall 2021
Course Description
Applications of advanced features of C and the C-library functions including: binary and random-access input/output, dynamic data structures, bit manipulation, string parsing and string-to-numeric conversion, event and error processing, function pointers, recursion, and variable-length argument list functions. As an honors course the students will be expected to complete extra assignments to gain deeper insight in design and implementation of advanced C programs.
Faculty Requirements
Course Family
Not Applicable

Course Justification


This course is intended for intermediate-level C/C++ programmers who want to take their skills to the next level. The course builds on students' existing background in C/C++ to complete their knowledge of ANSI C libraries, and the conceptual and syntactic structures needed to master dynamic data structures, string parsing and numeric conversion, memory management, bit-level manipulation, interactions with operating systems, and other advanced techniques. This class is the honors version of CIS D026B and as a result includes more advanced assignments and assessments. It is CSU and UC transferable.

Foothill Equivalency


Does the course have a Foothill equivalent?
No
Foothill Course ID

Course Philosophy


Formerly Statement


Course Development Options


Basic Skill Status (CB08)
Course is not a basic skills course.
Grade Options
  • Letter Grade
  • Pass/No Pass
Repeat Limit
0

Transferability & Gen. Ed. Options


Transferability
Transferable to both UC and CSU
°®¶¹´«Ã½ GEArea(s)StatusDetails
2G4MDA and 4-yr GE Math AgApproved

Units and Hours


Summary

Minimum Credit Units
4.5
Maximum Credit Units
4.5

Weekly Student Hours

TypeIn ClassOut of Class
Lecture Hours4.08.0
Laboratory Hours1.50.0

Course Student Hours

Course Duration (Weeks)
12.0
Hours per unit divisor
36.0
Course In-Class (Contact) Hours
Lecture
48.0
Laboratory
18.0
Total
66.0
Course Out-of-Class Hours
Lecture
96.0
Laboratory
0.0
NA
0.0
Total
96.0

Prerequisite(s)


Corequisite(s)


Advisory(ies)


CIS D022B, CIS D22BH or CIS D026A

Limitation(s) on Enrollment


  • (Not open to students with credit in the non-Honors related course.)
  • (Admission into this course requires consent of the Honors Program Coordinator.)

Entrance Skill(s)


General Course Statement(s)


Methods of Instruction


Lecture and visual aids

Discussion of assigned reading

Discussion and problem solving performed in class

Quiz and examination review performed in class

Homework and extended projects

Guest speakers

Collaborative learning and small group exercises

Laboratory discussion sessions

Assignments


  1. Reading from texts and handouts.
  2. Programs: Five to eight programming assignments covering the Lab Topics specified in X. below, with a special emphasis on dynamic data structures, files, and advanced string handling (half completed in the computer lab, half completed as homework)
  3. Students will complete an additional programming project. Such activity will require higher level of critical thinking and independent research using text and online information. Note: The honors project will require 10 or more hours of work beyond the regular (non-honors) course requirements, and will include higher expectations for achievement in this more advanced work.

Methods of Evaluation


  1. Guided short debugging programming assignments with output verifying program correctness.
  2. Successful completion of programming assignments where data structure algorithms are applied with output verifying program correctness; use of structured design principles, documentation, programming style, efficiency, and testing methods.
  3. A minimum of one, one-hour midterm which includes at least one problem requiring the writing of C functions involving advanced programming constructs. Code is evaluated on correctness.
  4. A comprehensive final exam which includes at least two problems requiring the writing of C functions involving advanced programming constructs. Code is evaluated on correctness.
  5. The honors assignment would be evaluated for the level of conceptual understanding of the advanced material, depth of analysis, and critical thinking skills. Code is evaluated on correctness.

Essential Student Materials/Essential College Facilities


Essential Student Materials: 
  • None.
Essential College Facilities:
  • Access to a computer with a C compiler

Examples of Primary Texts and References


AuthorTitlePublisherDate/EditionISBN
Klemens, Ben. "21st Century C: C Tips from the New School" O'Reilly Media; 2nd Edition, 2014. ISBN-13: 978-1491903896 ISBN-10: 1491903899
Perry, John. "Advanced C Programming by Example" Belmont, CA: PWS Publishing, 1998. ISBN-10: 0534951406 ISBN-13: 978-0534951405

Examples of Supporting Texts and References


AuthorTitlePublisher
Harbison, Samuel and Guy L. Steele, Jr. "C: A Reference Manual," 5th Edition. Englewood Cliffs, NJ: Prentice Hall Software Series, 2002
Griffiths, David & Griffiths, Dawn. "Head First C" O'Reilly Media; 2012, Print ISBN: 978-1-4493-9991-7, ISBN 10: 1-4493-9991-6, Ebook ISBN: 978-1-4493-9990-0, ISBN 10: 1-4493-9990-8

Learning Outcomes and Objectives


Course Objectives

  • Create programs which demonstrate mastery of common pointer manipulation.
  • Create programs which demonstrate knowledge of memory management functions and their use in the creation of linear dynamic data structures.
  • Create programs which use bitwise operators.
  • Create programs which use advanced string functions.
  • Create programs which employ advanced file input/output functions.
  • Create programs which use recursion -- especially the algorithms involving non-linear dynamic data structures such as binary trees and binary search trees.
  • Demonstrate usages of multi-dimensional arrays and the internal addressing formulae used by such data structures.
  • Use the ANSI C time functions to datestamp events and perform program benchmarking.
  • Demonstrate knowledge of advanced subprogram (function) features.
  • Write code which interacts with the Operating System environment outside of a program for event, error, and exception handling.
  • Demonstrate knowledge of sorting and searching within ordinary arrays using appropriate ANSI C functions.

CSLOs

  • Read, analyze and explain advanced C programs.

  • Design solutions for advanced problems using appropriate design methodology incorporating advanced programming constructs.

  • Create algorithms, code, document, debug, and test advanced level C programs using multiple source and header files.

Outline


  1. Create programs which demonstrate mastery of common pointer manipulation.
    1. Traversing arrays
    2. Array indexing versus pointer arithmetic
    3. Common pointer arithmetic
  2. Create programs which demonstrate knowledge of memory management functions and their use in the creation of linear dynamic data structures.
    1. Dynamic data structures versus static data structures
    2. Stacks
    3. Queues
    4. Lists
    5. Arrays of lists: Hashing to memory
    6. Lists of lists
    7. The malloc, calloc, realloc, and free functions
    8. Programmer-controlled memory management
  3. Create programs which use bitwise operators.
    1. Bitwise AND, OR, XOR, and NOT
    2. Bit shifting
    3. Bit masking
    4. Bit testing
    5. Bit rotation
    6. Use of XOR in encryption
    7. Bit printing
  4. Create programs which use advanced string functions.
    1. String parsing: the strtok and strpbrk functions
    2. String searching: the strchr, strrchr, and strstr functions
    3. String-to-numeric conversion: the strtol and strtod functions
    4. Arrays of strings
    5. Using pointer expressions as string function arguments
    6. Spanning strings: the strspn and strcspn functions
  5. Create programs which employ advanced file input/output functions.
    1. Review fopen for text files
    2. Fopen modes for binary files
    3. Fopen modes for random access files
    4. Random file access: the fseek and ftell functions
    5. Rewinding files: the rewind function
    6. Hashing to disk
    7. Use of index arrays to hash to files with variable recordlengths
    8. Binary versus text input/output
    9. Advanced features of printf and scanf: variable formatting, justification of output, non-decimal numeric output, string output, scan sets, and assignment suppression
  6. Create programs which use recursion -- especially the algorithms involving non-linear dynamic data structures such as binary trees and binary search trees.
    1. The recursive and stopping cases of a recursive function
    2. Costs, liabilities, and advantages of recursion
    3. Standard recursive algorithms
    4. The binary tree data structure
  7. Demonstrate usages of multi-dimensional arrays and the internal addressing formulae used by such data structures.
    1. Declaration and initialization of arrays of dimension two or higher
    2. Traversing rows and columns of matrices
    3. C memory model for arrays of dimension two or higher
    4. Using memcpy, memset, and memcmp to copy, initialize, or compare arrays
    5. Implementing ragged arrays via arrays of pointers
    6. Traversing arrays of pointers
    7. Address arithmetic in arrays of dimension two or higher
    8. Use of malloc/realloc to create dynamic arrays
  8. Use the ANSI C time functions to datestamp events and perform program benchmarking.
    1. The time function
    2. The localtime function
    3. The gmtime function
    4. The asctime function
    5. The ctime function
    6. The difftime function
    7. The strftime function
    8. Use of time functions to benchmark real time program performance
  9. Demonstrate knowledge of advanced subprogram (function) features.
    1. Review functions using pass by value and pass by reference.
    2. Pointers to functions
    3. Functions with variable-length argument lists
    4. Relationship of formal and actual parameters in array manipulation
    5. Static local variables
    6. Passing pointers whose values are to be changed
    7. Signals and signal-handling functions
  10. Write code which interacts with the Operating System environment outside of a program for event, error, and exception handling.
    1. The signal function
    2. The alarm and sleep functions
    3. Signal handling functions
    4. User-generated interrupts
    5. The assert function
    6. Leaving signal handlers: the setjmp and longjmp functions
    7. Problems with ANSI signal handling
    8. Leaving a program: the atexit, exit, and abort functions
  11. Demonstrate knowledge of sorting and searching within ordinary arrays using appropriate ANSI C functions.
    1. The qsort function
    2. The bsearch function
  12. Demonstrate a deeper understanding of the material through completion of an honors assignment.
    1. Design algorithms, code solutions, debug and test advanced C programs employing Multi-lists and Hybrid Dynamic Data Structures.
    2. Design algorithms, code solutions, debug and test advanced C programs employing Trees, Forests and Other Tree Variants.

Lab Topics


  1. Design algorithms, code solution, debug program employing common pointer manipulation.
  2. Design algorithms, code solution, debug program employing linear dynamic data structures.
  3. Design algorithms, code solution, debug program employing bit masking, setting, and testing.
  4. Design algorithms, code solution, debug program employing advanced string functions for parsing and analyzing strings and for converting strings to numbers.
  5. Design algorithms, code solution, debug program employing advanced file input/output functions involving random access, hashing to disk, and advanced formatting.
  6. Design recursive algorithms, code solution, debug program for non-linear dynamic data structures such as binary trees.
  7. Design algorithms, code solution, debug program employing multi-dimensional arrays.
  8. Use ANSI C time functions to datestamp events and perform program benchmarking.
  9. Design algorithms, code solution, debug program employing advanced subprogram (function) features such as function pointers, variable length argument lists, static variables, and system-invoked functions such as signal handlers.
  10. Write and debug code that interacts with the Operating System environment.
  11. Honors Assignment: Design algorithms, code solutions, debug and test advanced C programs employing Multi-lists and Hybrid Dynamic Data Structures, Forests and Other Tree Variants.
Back to Top