
Already know some of this? A 2-minute test skips the lessons you know.
Take the placement testA free 48-lesson course built from Bro Code's 6h 54m of YouTube video. 4 days at 90 minutes a day, with study notes and a quiz in every lesson. A 2-minute placement test skips what you already know.
Taught by Bro Code on YouTube. Videos play in YouTube's own player, so the creator keeps every view.
Introduces the C programming course, outlines the required tools (IDE and compiler), and demonstrates downloading and installing Visual Studio Code.
Shows how to create a project folder, add a main.c file, and install the C/C++ and CodeRunner extensions with recommended settings.
Guides through downloading MSYS2, installing the GCC compiler via pacman, verifying the installation, and adding the compiler to the system PATH on Windows.
Explains the structure of a C program including the #include directive, main function, return 0, printf for output, escape sequences, and comments.
Covers declaring and initializing variables of types int, float, double, char, string (char array), and bool, including format specifiers for printing each type.
Details format specifiers (%d, %f, %lf, %c, %s) and optional modifiers for width, precision (.2), and flags to control data display.
Demonstrates basic arithmetic (+, -, *, /, %), integer vs floating-point division, increment/decrement operators, and compound assignment operators (+=, -=, etc.).
Teaches using scanf for numeric and character input, fgets for strings with spaces, handling the newline character buffer issue, and removing it with strcspn or a space in scanf.
Builds a program that calculates total cost based on item name, price, and quantity, practicing variables, input, arithmetic, and formatted output.
Creates a Mad Libs game using string input (fgets), string.h for strcspn to remove newlines, and a reusable function to generate the story.
Introduces math.h functions: sqrt, pow, round, ceil, floor, fabs, log, and trigonometric functions (sin, cos, tan), plus M_PI constant.
Calculates circle circumference and area using radius input, M_PI, and pow function, with formatted output precision.
Implements the compound interest formula A = P(1 + r/n)^(nt) using pow, with user input for principal, rate, time, and compounding frequency.
Covers if, else if, else logic, comparison operators (==, !=, >, <, >=, <=), condition ordering, boolean variables (stdbool.h), and string validation with strlen.
Builds a menu-driven program to convert between kilograms and pounds using if/else logic, scanf for numeric input, and formatted floating-point output.
Creates a Celsius/Fahrenheit converter using char for menu choice, if/else for conversion direction, and formulas (C*9/5)+32 and (F-32)*5/9.
Explains switch syntax for integer and character values, case/break flow, default case, and using switches for menu-driven programs.
Demonstrates nesting if statements inside switches (e.g., division by zero check) and combining conditions with logical operators (&&, ||, !).
Builds a four-function calculator using a switch on operator char, nested if to prevent division by zero, and default case for invalid operators.
Covers && (and), || (or), and ! (not) operators with boolean and numeric examples, including range checking and boolean negation.
Introduces void functions, DRY principle, function syntax (return type, name, parameters), calling with arguments, and parameter vs argument distinction.
Explains passing arguments to parameters, renaming parameters, returning values (float, int), function prototypes, and using return in expressions.
Distinguishes local scope (inside functions), global scope (outside functions), and block scope; shows variable shadowing and best practices.
Shows why prototypes are needed when functions are defined after main, how to write them, and their role in forward declaration.
Covers while (pre-check), do-while (post-check), boolean loop control, input validation loops, and escaping with break/condition change.
Details for loop syntax (init; condition; update), counting up/down, step sizes, nested loops for grids, and Sleep for delays (Windows/Linux).
Shows nested for loops for multiplication tables and 2D grid printing, using different counter variables (i, j) for rows and columns.
Explains pseudo-random generation with srand(time(NULL)), rand(), modulus for range limiting, and offset for 1-based ranges.
Builds a 'guess the number' game using do-while loop, rand() for secret number, scanf for guesses, and high/low hints with attempt counter.
Implements RPS with function prototypes, getComputerChoice (rand%3+1), getUserChoice (validated input), and checkWinner using logical operators.
Creates an ATM simulator with checkBalance, deposit, withdraw functions returning float, a do-while menu loop, switch on choice, and balance tracking.
Covers 1D array syntax, initialization, index access, sizeof for length, for loop iteration, and string arrays with fgets/strcspn.
Demonstrates filling arrays with scanf in a for loop using index i, and printing array contents with a second loop.
Explains 2D array syntax (rows, columns), nested loops for row/column access, and a keypad example with char grid.
Shows string arrays (2D char arrays), typedef for string alias, sizeof for loop bounds, fgets for input with buffer size, and loops for input/output.
Builds a multiple-choice quiz using 2D char arrays for questions/options, answer key array, for loop for questions, fgets for input, toupper for case-insensitivity, and score tracking.
Introduces the conditional operator (condition ? valIfTrue : valIfFalse) as shorthand for if/else, with examples for max, parity, status strings, and time meridian pointer.
Explains typedef to create type aliases (e.g., typedef int number; typedef char string[50]; typedef char initials[3];) for readability.
Covers enum syntax, named integer constants (default 0-based), custom values, typedef enum for cleaner usage, and switch on enum status in a function.
Defines struct Student with members (name, age, gpa, isFullTime), typedef struct for alias, dot operator for member access, and initialization with designated values.
Creates an array of Student structs, initializes multiple students, loops to print members, and demonstrates struct arrays for related data groups.
Introduces pointers (*), address-of (&), dereference (*), pointer arithmetic precedence, passing addresses directly to functions, and the 'key' mental model.
Shows fopen with 'w' mode, FILE* pointer, fprintf for formatted writing, fclose for resource cleanup, null check on open, and absolute vs relative paths.
Demonstrates fopen with 'r' mode, fgets with buffer (1024 bytes) in while loop, feof/null check, fclose, and reading from absolute file paths.
Explains malloc for heap allocation (bytes = count * sizeof(type)), casting return pointer, free() to release, null check, and avoiding dangling pointers.
Covers calloc (count, size) which zero-initializes memory, same free/null-check pattern, and comparison with malloc.
Shows realloc(ptr, newBytes) to resize allocations (grow/shrink), copying data to new block, updating pointer, and freeing old memory automatically.
Builds a real-time clock using time.h (time_t, struct tm*, localtime), Unix epoch, sleep(1000) for 1-second updates, arrow operator (->) for struct pointer member access, and formatted HH:MM:SS output.