Compilation and types
C is compiled ahead of time and has a small set of primitive types.
What you will be able to do
- Use inttypes.h types such as int32_t when size matters.
- Compile with -Wall -Wextra -Werror and fix every warning.
- Include stdio.h before using printf.
In plain English
The compiler translates each source file into an object file and the linker combines them into an executable. Types describe size and representation. Integer overflow and implicit conversions are your responsibility, not the runtime’s.
#include <stdio.h>
#include <stdint.h>
int main(void) {
int32_t minutes = 12;
double rating = 4.8;
printf("%d minute lesson, %.1f rating\n", minutes, rating);
return 0;
}Your turn
EasyPrint a lesson summary
Print "HTML: 8 lessons" using an int and a string.
C · starter
int lessons = 8;
printf("TODO");Check your understanding before moving on.
Knowledge checkQuestion 1
What does the linker do?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.