CS208 Introduction to Computer Systems Monday, 3 April 2023 + Upcoming schedule - Programming assignment #3: 4/11 - Online quiz (take as often as you want): 4/15 - In-class exam: 4/19 - Note: new OAR rules--student has to request exam 72 hours ahead + Today - VS Code debugging lab - queues assignment: memory, pointers, structs - the importance of understanding what the heck is going on + Lab - Go to it - Doing this with multiple-file programs ---- + Memory organization of a C program - Instructions (fixed-size at compile time, "text") - Initialized data (fixed-size at compile time, read-only) - Global variables (fixed-size at compile time, read-write) - The heap (space you allocate via malloc) - The system stack (local variables & function parameters) (grows from high addresses towards lower) + Memory & C pointers - Variables have types - You can "typecast" some variables from one type to another - Declaring a variable - Defining a variable - Declaring/defining/initializing pointers - Initializing a variable - The & unary operator - The * unary operator + C structs - What are they? - typedef - . vs. -> + Break + The queues assignment