
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore C fundamentals, control flow, memory management, and files, then contrast C with C++ concepts, finish with a capstone project and final exam, reinforced by code-based quizzes.
Understand what C is and how it relates to other languages, and set up Visual Studio Code with the C/C++ extension to compile code and print hello world.
Write your first C program by including stdio.h, defining int main(void), printing hello world with printf, and returning 0, with braces and semicolons guiding basic syntax.
Explore data types in C, including int, float, double, long, char, and strings, and learn about signed and unsigned numbers, constants, and explicit typing.
Learn to print and input in C/C++, using printf and scanf, format specifiers for numbers and strings, and printing expressions like a plus b equals c.
Understand that comments do not affect execution, learn line and multiline styles, and use documentation comments to describe functions, parameters, and returns for future readability.
Demonstrates arithmetic and modulus operators in C, shows integer division behavior, and introduces casting to float, while using printf and size of to compare int, float, long, double, and char.
Explore how conditionals use if, else, and else if to control program flow, with practical age-based examples showing how to implement fallback and default cases.
Master nested conditionals, switch statements, and the ternary operator in C/C++ by exploring if-else patterns, menu logic, case handling, and clean, concise one-line alternatives.
Explore arithmetic and relational operators, compound arithmetic/assignment operators, and logic with and, or, not, including precedence, parentheses, and truth tables for complex conditionals.
Explore writing efficient C/C++ code with loops by comparing while, for, and do while constructs, illustrating counter management, conditions, increments, and control flow using continue and break.
Explore how functions act as reusable building blocks, covering function signatures, return types, arguments, by-value passing, and practical examples in C/C++ including main, void, and calling patterns.
Explore recursion through factorial across four ways—upward loops, downward loops, recursive calls, and ternary style—emphasizing the condition and how the call stack resolves the result.
Master how to store multiple data items using arrays and matrices, including one- and two-dimensional forms, with zero-based indexing, capacity limits, and basic printing.
Learn how strings work in C, including char arrays and the null terminator, ASCII concepts, and essential string functions like string length, string cat, string copy, and string comp.
Explore pointers in C and C++, including the dereference and address operators, memory layout with stack and heap, and pointer-based techniques like array traversal and swapping by reference.
Explore function pointers in C, including creating arrays of function pointers for operations like add, subtract, multiply, and modulus, and invoking them via user choices.
Explore pointer concepts in C, including arrays, void pointers, static and compile-time variables, and function pointers with quicksort and callbacks.
Explore defining and using C structures, including typedef struct and dot notation. Use the arrow operator with pointers, print and return structures, and create types like person, student, square, circle.
Analyze unions and compare with structs to understand memory layout, size, and how a union stores one data type at the same space, such as shop id or VIN.
Explore memory management in C and C++, linking it to pointers, and demonstrate allocating memory for arrays, checking for null, and freeing memory to prevent leaks.
Learn memory management by dynamically allocating memory with malloc, calloc, and realloc, resizing arrays, checking for null, and freeing memory for int, char, and user-defined objects.
Explore building a dynamic array in C, handling size and capacity, memory allocation, resizing, and deallocation. Learn dynamic strings with copy and concatenation.
Explore error handling in C using the Erno library, handling division by zero, domain and range errors, and printing messages to standard error, with exit codes for success or failure.
Learn C file I/O and random number generation, with seeding and preprocessor considerations, using fopen, fprintf, fscanf for binary and text files across Windows and Unix platforms.
Explore the C preprocessor, mastering macros and macro functions, header files and include directives, and how scope and global access shape code metadata like time, file, and line.
Explore preprocessor directives for conditional compilation in C/C++, including include header files, define and undef, if defined, if not defined, if else, and pragma, plus macro utilities.
Discover the two preprocessor operators in C: the stringizing operator and the token pasting operator, and learn to build macros that stringify arguments and paste tokens, with practical examples.
Explore how c++ extends c with iostreams, insertion and extraction operators, and std::string; use of using namespace std simplifies output and input, plus function overloading and optional arguments.
Explore how C and C++ headers differ and how extern C enables compatibility, then learn class design with constructors, private members, getters, destructors, and memory management topics.
Explore intermediate classes in c++. Build a bank class with constructor and destructor, using namespaces and member initializer lists. Review pointers, memory management, and namespace usage; preview polymorphism and inheritance.
Learn about advanced class design in C++, including default and copy constructors, this and the arrow operator, friend and protected access, and inheritance and polymorphism.
Explore classic, abstract, and interface inheritance in c++ and c#, using virtual methods and abstract classes, and master operator overloading with practical box examples.
Explore generic typing and exceptions in C++ by using templates to create flexible functions and classes, and learn exception handling, including custom exception classes and try-catch flows.
Explore enumerations for clear switches and text values, and perform file input and output with ifstream, ofstream, and fstream, including append, truncate, and line-based reading.
In this course, students will learn elementary programming concepts with the C language, with an additional section studying C++ and the relation between the two languages. Learning C will allow students to develop the basic skills for procedural programming and the fundamentals of object orientation, as well as a short study of C++. Students can use this knowledge to take on learning higher-level languages such as C#, Java, and Python in an accelerated manner. The class will focus on building programming skills from fundamental keywords to high-level abstraction, in hopes that the student will then continue on to learn a high-level programming language afterward.
Students will learn the following aspects of programming using the C language:
Section 1:
-Introduction, how to succeed in the course
-What is C, understanding programming, setup
-Hello World
-Data Types
-Input and Output
-Commenting
-Operators
-Introducing Conditionals
-Conditionals
-Nested Conditionals, Switches
Section 2:
-Logic Operators
-Loops: for, while
-Functions
-Recursion
-Arrays, Matrices
Section 3:
-Strings/String Functions, ASCII
-Pointers
-Function Pointers
-The void Pointer, Static
-Structures
-Unions
Section 4:
-Memory Management
-Memory Functions: malloc, calloc, realloc
-Dynamic Strings and Arrays
-Error Handling
Section 5:
-Working With Files, Binary File I/O, Random Generation
-Preprocessor Directives, Scope, Headers
-Conditional Compilation Directives
-Preprocessor Operators
Section 6 - C++:
-Differences: new data types (strings, boolean), function/argument overloading
-Intro to Classes (constructors, objects)
-Intermediate Classes: class headers, namespaces, member initializer lists
-Advanced Classes: access keywords, 'this', 'friend', inheritance and polymorphism
-Abstract Classes/Interfaces, 'virtual', operator overloading
-Generic Types/Classes (Templates), Exceptions
-Files, Enumerations
Section 7 - Capstone:
-Final exam
-Capstone project
Optional textbooks:
-"C Programming Language, 2nd Edition" by Brian W. Kernighan and Dennis M. Ritchie (Various prices by format and rental); this book is extremely well-known in the programming community for being fundamental to developing one's skills with programming languages.
-"The C++ Standard Library: A Tutorial and Reference, 1st Edition" by Nicolai M. Josuttis (Various prices by format and rental, very cheap on eBay)