Software Development

Introduction to C Programming

Overview

This class provides students with a foundational study of the C programming language, C23 standard. Classroom lectures stress the strengths of C, which provide programmers with the means of writing efficient, maintainable, and portable code. Lab exercises throughout the class test and reinforce understanding of the concepts.

This class is best taken as the first of a two-class series. The concepts in this class are further developed in the follow-on class, Intermediate C Programming. Completing both these classes will take a developer without C knowledge to become a capable C programmer.

Cumulative graded assessments available for group training.

Duration

40 hours

Who Should Take This Course

Audience

This class is intended for developers with some programming experience. This class is not designed for students who are completely new to programming; it is targeted at developers with at least one month of programming experience. UMBC Training Centers recommends following this class up with Intermediate C Programming.

Prerequisites

Students should have completed our Python for Beginners class or have equivalent experience with a programming language.

Why You Should Take This Course

Upon completion of this class, students will be able to the following in C:

  • Build and run simple C programs.
  • Name, declare, initialize, and manipulate numeric values in variables.
  • Define and manipulate arrays.
  • Create and call functions.
  • Control program flow through conditionals and loops.
  • Define, manipulate, and call functions with strings (character arrays).
  • Perform basic I/O with a console and on-disk files using library functions.
  • Declare, define, initialize, and manipulate new struct types.
  • Search, parse, and split strings using library functions.
  • Debug the behavior of a running program.

Course Outline

Introduction to C Programming

  1. Building and Running C Programs

    • C Build Pipeline
    • Compiler Warnings
    • The ‘Most Important Picture’
    • Accessing Documentation
    • The indent Program
    • C Standard Libary Overview
    • The main() Function
  1. C Syntax and Operators

    • C Operators
    • Operator Precedence
    • Operator Associativity
    • Unary and Ternary Operators
  1. C Types and Arrays

    • Using printf() Family of Functions
    • Declaring, Defining, and Initializing Variables
    • Integer Data Types
    • char Data Type
    • Floating-Point Types
    • Boolean Types
    • Constants With const or enum
    • Type Conversions
    • sizeof() Operator and size_t Type
    • Declaring, Defining, and Initializing Arrays
    • Strings as Arrays of char
  1. Control Flow

    • Blocks and Scope
    • Conditionals with if/else
    • Loops with while/do/while
    • Loops with for
    • Flow Control with break/continue/goto
    • Conditionals with switch/case
  1. Functions

    • Declaring and Defining Functions
    • Returning Data From Functions
    • void Functions
    • Function Arguments and Parameters
    • Array Decay
  1. Strings

    • String Representation
    • Using Safe string.h Functions
    • Avoiding Buffer Overflows
    • String Encodings
  1. Input/Output (I/O)

    • Program I/O and Redirection
    • Reading Data From stdin
    • Writing Data To stdout and stderr
    • Opening and Closing Files
    • Buffered I/O with FILE * Objects
    • Detecting and Reporting I/O Failures
  1. Structures and Unions

    • Declaring and Defining New struct Types
    • Accessing and Manipulating Field Members
    • Initializing Record Types
    • struct Alignment and Padding
    • Nested, Member, and Anonymous struct Types
    • The stat() System Call
    • Accessing and Manipulating union Types
  1. Text Parsing

    • Character-Searching Library Functions
    • String-Searching Library Functions
    • The strtok() Function for Tokenization
  1. Debugging

    • The gdb Debugger
    • Building Programs for Debugging
    • Debugging Strategies
Search UMBC Training Centers