
Master the C programming language by studying its syntax and memory management, tackle practical exercises, and together build a particle fire simulation.
Set up your computer for C development, run a hello world program, and explore the build phases, variables, and arithmetical expressions, then complete an exercise by typing code and experimenting.
Install a C development environment by setting up GCC or clang and the Visual Studio Code editor, then configure cross-platform setups for Linux, macOS, and Windows with MSYS2 and MinGW.
Learn to write a basic hello world in C, set up a project in Visual Studio Code, include stdio.h, define main with int, use printf, and compile with gcc.
Explore different hello world forms in C, including using stdio.h and printf, standard main signatures, return values, and basic command-line arguments via argc and argv.
Learn how building a C program advances through three phases: pre-processor, compilation, and linking. Explore how stdio.h, object files, and libraries—static and dynamic—are combined into an executable.
Declare and initialize an int variable in c, then print it with printf using the %d specifier, and observe how uninitialized values print garbage unless set to zero.
Explain the char type in C as the smallest integer type, one byte, eight bits, with a signed range of -128 to 127, and demonstrate printing with printf and sizeof.
Discover the C integer types from char and int to short, long, and long long, and see how architecture influences their sizes using printf and sizeof.
Explore the three floating types in C: float, double, and long double—learn their sizes, format specifiers, and how to print with precise decimal places, plus boolean and fixed-width int types.
Learn how to read a single character input in C using stdio.h, print it with %c or %d, and understand ASCII interpretation, while noting that strings require additional topics.
Explore casting in C by converting int to double and back, showing widening and narrowing conversions and explicit casts with int, double, and char types.
Explore the arithmetic operators in C, including plus, minus, multiply, divide, and modulus, with examples of integer division, remainder via modulus, and casting to double for floating point division.
Compare two constant creation methods in C: using const and using the #define preprocessor, noting scope and reliability. Highlight trends with Kotlin val and Rust mutable concepts to reduce bugs.
Learn how to implement a miles-to-kilometers exercise in C, converting a single-digit ascii input to a number using the zero character and printing the result with format specifiers.
Explore control flow in C by examining if statements, while and for loops, relational and logical operators, the ternary operator, and the distinction between postfix and prefix increment and decrement.
Master the C if statement: condition in parentheses, optional braces, and else if/else blocks; learn that zero is false and nonzero is true, unlike Python or Java.
Explore logical and relational operators in C, including ==, !=, &&, ||, !, &, |, <, >, <=, >=, and how booleans become 0 or 1.
Explore while loops in C by initializing a counter, using postfix and prefix increments, and printing 1 through 5; compare do while loops that execute at least once.
Compare postfix and prefix increment and decrement operators in C, showing how value is used before or after increment. The postfix form stores a copy and is slightly less efficient.
This lecture demonstrates a while loop in C, with break and continue, including an infinite loop and a postfix decrement that prints 4, 2, 1, 0.
Master the for loop in C by initializing a counter, testing a condition, and updating the counter to run iterations, and explore its relation to range based loops.
Explore the switch statement in C, using values and cases, learn when to include breaks to avoid fall through, and see the default case handle unmatched values.
Explore the go to keyword in C, use labeled end loop to break outer loops, and see how nested while loops and printf are demonstrated.
Master the ternary operator in C by exploring its three operands, condition, and the ? : syntax, with practical fridge temperature examples and conditional printf outputs.
Demonstrates a C exercise that reads a digit 0–9 with getchar and validates input, then prints a width-three multiplication table up to that number using two nested loops.
Explore complex data structures, including arrays, structs, enums, and unions, in this introduction to their roles and usage in C.
Learn how to create and initialize arrays in C, including fixed-size and initializer syntax, indexing from zero, stack allocation limits, bounds issues, and using sizeof to count elements.
Explore multidimensional arrays in C by constructing and initializing a two-dimensional table, accessing elements with zero-based indices, and printing the array using nested loops and a %f format specifier.
Explore array initialization in C, from memset and zeroing bytes to portable alternatives, including C89 braces, C99 subscripts, and C23 empty brackets, with default zero behavior.
The struct data type in C lets you bundle different data types and name them. Declare it with the struct keyword, initialize fields with dot notation, and print them.
Learn how to initialize structs in C to avoid garbage values, using declaration-time values, dot notation, and C99 methods for setting fields, including anonymous struct types.
Explore nested structs in C by defining a person with an id and an anonymous inner struct for weight and height as a data field, then initialize and print.
Explore enums in C, a syntax similar to structs for defining related constants. Learn default zero-based values, custom assignments, limited type checking, and common use for bitmasks and switches.
Explore unions in C, learn how they share memory with struct-like syntax, how the size equals the largest member, and how endianness affects bytes.
Practice a C data structure exercise by declaring a two-integer struct, creating an array of ten, initializing the first field 0–9 and the second 10–1 with loops, and printing them.
Explore core concepts in C by examining functions and headers, including function arguments, return values, and the extern and static keywords.
Learn how to define freestanding functions in C, declare prototypes before use, and use stdbool.h to handle booleans; call show info from main and understand void and parameter passing.
Understand passing arrays to functions in C with a sum example, using an explicit size parameter and the concept that arrays decay to pointers and can be const.
Explore how header files define function prototypes and how the preprocessor inlines them before compilation. See how angle-bracket versus quoted includes affect directory search and multi-file gcc builds.
Learn how header files in C can be included multiple times, causing struct redefinition, and fix it with pragma once or traditional include guards (#ifndef, #define, #endif).
Explore how copying structs works in C by value, including passing and returning structs from functions. See that a struct with an array copies completely and remains independent.
Explore how the extern keyword enables a count defined in data.c to be used in main.c. Forward declare it in a header and link object files to share the variable.
Explains how the static keyword restricts scope to a file, changing linkage from external to internal, and shows static functions and variables that persist between calls.
Write a Fibonacci function that fills an array with a requested number of values, using a header prototype, basic error checks, and a runnable example that prints the sequence.
Explore pointers in C, demystify their bugs, unlock power and efficiency, and learn to allocate and manage heap memory using the typedef keyword.
Create a pointer to int, use the address-of operator to obtain the value's address, dereference to read or modify it, and note p_value Hungarian notation while printing in hexadecimal.
declare a pointer to a struct and use arrow syntax to access its fields. learn to pass a pointer to a function to modify the original struct without copying.
Explore how to pass a struct to a function by pointer, modify its fields in place, and compare passing by value with using const pointers to prevent changes.
Explore how pointers to arrays work and how the array name acts as a pointer to the first element. Use pointer arithmetic and dereferencing to traverse and print all elements.
Learn pointer arithmetic and strings in C with char arrays, the null terminator, and printing with %s and %c, while moving and dereferencing pointers and understanding array names as pointers.
Examine pointer types in C by contrasting a pointer to a const char with a const pointer to a char, showing how modification and pointer movement affect string access.
Learn how typedef in C defines your own type aliases to shorten declarations and simplify using structs, unions, and pointers, with examples showing text pointers and struct value types.
Learn to allocate memory in c with malloc on the heap, cast the void pointer to a char pointer, and free it after use, checking for null.
Explore generating random numbers in C using rand and srand seeded with time; learn to produce 0-1 values, and 0-255 unsigned char ranges, with formatted output.
Allocate memory for an array of pixel structs with malloc and verify the allocation, sizes, and padding. Note how padding inflates struct size and compare heap allocation to stack usage.
Never return the addresses of local variables from functions in C, because those locals go out of scope, leaving pointers to invalid memory and risking undefined behavior.
Explore function pointers by declaring and using pointers to a multiply function, enabling passing functions as arguments, dereferencing them, and calling via the address-of operator.
Learn how to return a function pointer in C with a get_op function, returning a pointer to multiply, then call it via dereferencing and print the result.
Explore void pointers in C, showing they can point to any type and be converted to and from typed pointers without casts, unlike C++, where an explicit cast is required.
Explore pointers to pointers and how a function can modify where the original pointer points. Dereference with one or two asterisks to control the pointer’s target.
Explore string handling in C, focusing on efficiency and a rich set of functions and techniques for working with strings.
Explore the strlen function and the differences between sizeof and strlen in C, with a char array, a string terminator, and examples of sizes 6 vs 5 and 50 chars.
Compare two strings with strcmp and strncmp to determine equality and order, examining return values and how the first differing characters influence the result. Zero means identical; nonzero signals differences.
Discover how C handles string concatenation with strcat, the need for a sufficiently large buffer, and the risks of overflow when memory is insufficient.
Master scanf reads console input using format specifiers to interpret values such as integers, returning number of tokens scanned; learn its limitations and when to write your own input routines.
Learn how s scanf in C scans a string and an integer using a ten-character buffer with a nine-character limit. The video shows token counts and cautions about untrusted input.
Copy strings in C using strcpy from string.h, ensuring the destination is large enough and the source is null terminated to avoid buffer overflow.
Learn how str n copy copies a set of characters from a source string into buffer, and that it does not automatically add a null terminator when copying fewer characters.
Tokenize strings in C with strtok from string.h by splitting text on a space, using first argument for the text and second for the delimiter, returning tokens until null.
Explore arrays of strings as an array of pointers to chars, printing each with percent s and using sizeof to show pointer memory, not the string data.
Demonstrate the puts function for simple console output in C, which prints a string and adds a newline, unlike format capable functions. Note gets is deprecated while fgets remains usable.
Explore command-line arguments in C by using argc and argv as an array of strings, printing each argument, including the zeroth element with the program's path.
Master a strings exercise in C: convert spelled-out numbers 0–9 to digits, tokenize with strtok, sum values with plus signs, print total, and highlight invalid tokens.
Explore essential C memory functions like memset and memcpy for working with blocks of memory. Learn about math functions and the qsort algorithm that implements quicksort.
Learn how memset in C sets every byte in a memory block, zeroing a 1024-byte region and producing a 20-byte string of E characters, with a null terminator.
Explore the memcpy function in C to copy data between memory areas, using char arrays, calculating buffer size with a null terminator, and printing results to verify the copy.
Discover useful math functions from the C standard library's math.h, including pow, round, ceil, and sin, all returning doubles, with notes on pi and practical casting to int.
Explore converting strings to numbers in C with standard library functions like atoi and atof, and convert numbers to strings using sprintf, noting nonstandard conversions and undefined behavior on failures.
Explore sorting an array with the qsort function from the standard library, implementing a comparator for integers and handling const void pointers and casting, to perform quicksort.
Explore reading and writing files in C, with a focus on binary I/O, and discover how easy binary file operations can be when compared to Java or Python.
Learn how to write text files in C with fopen, handle modes, check for errors, and write text with fprintf to create files such as test.txt.
Read text files in C by opening with fopen in read mode, define a line buffer, read lines with fgets, loop until end, print each line, and close the file.
Mastering C teaches writing binary files in C by opening a file in write and binary mode, then using f write to write an int and a doubles array.
Read binary files in c by opening a file in read-binary mode, reading an int and an array, and printing results to verify the data.
Learn how to seek in binary files with fseek to move the file pointer by bytes from the beginning or current position, then read data with fread.
Learn to write a packed data struct to a binary file in C, using a typedef struct with a float and a char, and understand header versus source file organization.
Read a binary file into a data_t struct with a float and a char, using packing off to align on byte boundaries and fread to read one item.
Explore the three predefined streams in C, standard out, standard in, and standard error, and learn how printf, fscanf, and redirection send text to the console or to files.
Design and implement binary file i/o in C by writing and reading a person record (name, weight, height) with a packed struct and name-length handling using b+ mode.
Learn core bitwise concepts in C, including bit shift operators and using bitwise and and or, to write efficient low-level code.
Explore the bit shift operators in C by shifting binary and hexadecimal values. See how left shifts move bits across bytes and relate to multiplying by two.
Explore how the bitwise and operator works on integers in C, using binary and hexadecimal masks to zero out bits and demonstrate masking with a uint32 value.
Explore the inclusive or operator, its bitwise behavior on binary data, and how or equals updates values by combining bit patterns from two operands.
Explore the exclusive or operator, using a flag enum to show how bitwise and, or, and xor manipulate read, write, and append flags in a practical C example.
Practice a C bitwise exercise converting a 32-bit integer to three color bytes (red, green, blue) and back, using bit shifts, masks, and optional unions to illustrate endianness.
Would you like to be able to code in one of the most important, influential, and popular programming languages ever created? Perhaps you're frustrated by the limitations and inefficiency of other programming languages, but intimidated by C's fiercesome reputation.
Would you like to to be able to create compiled, native apps?
Not to worry, this course will demystify C and show you how to leverage C's incredible speed and efficiency.
Unlock the power of C with this hands-on programming course designed for those with a bit of coding experience who are ready to dive into the language that has shaped modern computing.
We'll start by discussing C and its unique characteristics, and from there, you’ll learn how to work with variables, use control flow statements including loops and conditions, and we'll delve into compound data types (arrays, structs, unions).
As the course progresses, you’ll learn how to structure your code with functions and you'll gain a deep understanding of pointers, one of C’s most potent features.
You’ll discover how to manipulate strings, leverage useful standard functions, and how to handle text and binary files for data persistence. We’ll unlock the power of bitwise operators, explain how to effectively use the preprocessor and macros, and we'll cover error handling so you can create robust, reliable code.
The grand finale? We’ll pull everything together as you create your own animated screensaver-style program: a stunning "particle fire explosion" animation.
By the end, you’ll have the knowledge and confidence to write efficient, high-performance C programs, and a visually striking project to show off your new skills.