Dashboard/Block 1: Foundation/Module 1
Module 1Foundation

First Programs

Alright, so you are about to write your very first programs — exciting, right? But before we jump into building anything fancy, let's talk about what actually happens when you type some code and hit "run." Like, what is really going on behind the scenes?

Think of it this way: imagine you want to invent a brand new language — like an actual human language. What would you need? An alphabet, some grammar rules, a way to structure sentences, right? Programming languages work the same way. C is the language (with its own rules and grammar), and the compiler is the tool that checks if you followed those rules correctly and then translates everything into something the computer can actually understand — binary, the 1s and 0s.

This week, we are going to cover three big things. First, how your code becomes a program — you write a text file, a tool called a compiler translates it, and boom, you have something that runs. Second, variables and data types — think of these as labeled boxes where you stash your data (numbers, letters, decimals) while your program does its thing. Third, input and output — how your program talks to the user with printf and listens with scanf.

ConceptWhat It MeansWhy It Matters
Source CodeThe .c file you write in CIt is your set of instructions in human-readable form
Compiler (gcc)Translates source code to machine codeThe computer cannot read C directly — it needs binary
VariableA named box in memory that holds a valueEvery program needs to store and manipulate data
Data TypeThe kind of value a variable holds (int, float, char)Tells the computer how much memory to reserve and how to interpret the bits
printf/scanfFunctions for output and inputHow your program communicates with the user

Learning Objectives

Understand what a computer program is and how source code becomes an executable
Install VS Code and a C compiler (GCC)
Write, compile, and run your first Hello World program
Declare variables of different data types (int, float, char)
Use printf to display formatted output

Key Concepts

How Code Becomes a Program

Variables and Data Types

User Input with scanf