Sign in to confirm you’re not a bot
This helps protect our community. Learn more

What did we learn last week? Arrays • Arrays don't change size • 2D Arrays Pointers • Variables that store memory addresses • How we use memory addresses to access variables

11:47

What are we covering today? Pointers recap Debugging • What's a bug? • How do we find them and remove them? Characters

19:51

Recap - Pointers and Memory What is a pointer? • It's a variable that stores the address of another variable of a specific type • We call them pointers because knowing something's address allows you to "point" at it Why pointers? • They allow us to pass around the address of a variable instead of the variable itself

26:16

Pointers in Functions We'll often use pointers as input to functions • Pointers give a function access to a variable that's in memory • They also allow us to affect multiple variables instead of only having one output

37:11

Pointers and Arrays These are very similar • Arrays are sections of memory that contain multiple identical variables • The variable of the array itself stores the memory address of the start of the array • Pointers are also memory addresses • This gives both pointers and arrays access to memory

38:07

Debugging It's going to take up most of your time as a programmer! • What is a bug? • Different types of bugs • How to find bugs

41:46

What is a Software Bug? Errors in code are called "bugs" • Something we have written for not written in our code . Any kind of error that stops the program from running as intended Two most common types of bugs • Syntax Errors • Logical Errors

45:54

Syntax Errors C is a specific language with its own grammar • Syntax - the precise use of a language within its rules • Cis very much more specific than most human languages • Slight mistakes in the characters we use can result in different behaviour • Some syntax errors are obvious and your compiler will find them • Some are more devious and the error message will be the consequence

51:24

Logical Errors We can write a functional program that still doesn't solve • Logical errors can be syntactically correct . But the program might not do what we intended!

54:59

How do we find bugs? Sometimes they find us ... • Compilers can catch some syntactical bugs • We'll need to learn how to use compilers to correct our code • Code Reviews and pair programming help for logical bugs • Testing is always super important! • Learning how to test is a very valuable skill

58:59
Lecture 9, COMP1511 - Programming Fundamentals 2020 Term 2 (Live Streamed)
Lecture 9 - Debugging and Characters. Now that we're working on larger problems with more moving parts and complexity, it's a good time to look at techniques we can use to diagnose what issues we're having and how to fix them. We'll also be introducing a new variable type, Characters. Now we'll start playing around with letters to go with the numbers we've been using so far.

Follow along using the transcript.

Marc Chee

1.61K subscribers