What is programming? A clear, beginner-friendly introduction to the core concepts of C.
π What to learn on this page
β Must-know essentials
A program = a set of exact instructions for a computer
C is compiled: source β translate β executable
Ambiguous instructions won't work; be precise
β Read if you have time
Compiled vs interpreted languages
History and uses of C
Why learn C today
π¬
Watch this lesson as a video (3 minutes)
Slide explanation + English narration
What is programming?
A program is a set of instructions written for a computer. Programming is the act of creating those programs.
A familiar analogy: the recipe
Think of a cooking recipe: "chop the onion finely β stir-fry in oil for 3 minutes β add 1 tsp of salt." Each step is concrete, with specific quantities. A program is the same idea β a sequence of unambiguous instructions.
Recipe π³
ingredients β steps β dish skip a step, taste changes
Program π»
input β processing β output skip a step, you get an error
Robot commands π€
"Walk 3 steps, turn right" numbers and directions explicit
Programs are everywhere
Most of the things around you run on programs:
Phones and laptops β the OS and every app are programs
Microwaves and rice cookers β timers and cooking modes are programmed inside
Traffic lights and automatic doors β control programs reacting to sensors
ATMs, ticket machines, gates β strict handling of money and authentication
Games and animation β physics, rendering, and AI
Four traits of a computer
β‘ Fast
billions of operations / sec
β Exact
same input β same output
π€ Never tires
repeats tasks forever
π€ Doesn't "think"
it only does what you wrote
That's why programming matters: you have to give the computer unambiguous instructions. "Do it nicely" or "go that way" β the kind of thing that works between humans β falls apart completely here.
Human vs computer — experience the difference
π€
Programming language — C
In this course we'll use the C programming language with Visual Studio as the development environment.
File-name rule: C source files end in .c, like hello.c. Don't use .cpp β that extension is for C++.
C language
Since 1972. OS / embedded systems. Covered in this course.
Python
Popular for AI and data analysis.
Java
Enterprise systems and Android.
JavaScript
Web development. This site uses JS too.
Why learn C?
Even in the age of Python and JavaScript, there are still plenty of reasons to learn C.
The machine shows through β memory, pointers, and types aren't hidden from you
Where speed matters, C shows up β operating systems (Linux, macOS), databases, game engines, embedded devices
Many languages were influenced by C β C++, Java, JavaScript, and many others carry C-style syntax or ideas
Long track record β born in 1972, with 50+ years of documentation
Standard in university curricula β showing up on exams isn't the same as being obsolete
Coming from another language? Python's "it just works" magic isn't here. You manage pointers and memory yourself. It's a tough first climb, but once you get through it you'll have a much better sense of what's happening under the hood of every other language too.
Compiled vs interpreted languages
Programming languages generally fall into one of two execution styles.
π Compiled
Translated ahead of time into an executable
Execution: fast
Examples: C, C++, Rust, Go
π Interpreted
Translated on the fly while running
Slower but easier to iterate
Examples: Python, JavaScript, Ruby
C is a compiled language. You hand your source code to a compiler once, it spits out an executable (a.out or hello.exe), and you run that executable.
Cooking analogy:
Compiled = translate the whole recipe once into the computer's language, then cook from that version
Interpreted = a translator stands next to you and interprets each step as you go
The build / compile flow
A .c file can't run as-is β it has to be translated first, i.e. compiled.
📝 Source code (hello.c)
⚙ Compiler (translates)
📦 Executable (hello.exe)
💻 Run & show result
What if an error occurs?
Compile error
The syntax is wrong — a missing semicolon, an unclosed bracket, that sort of thing.
Runtime error
The code runs but misbehaves — division by zero, an infinite loop, and so on.
Try triggering an error
The code below has a bug. Fix it, then try running it. (Hint: semicolon.)