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

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

12:05

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

14:59

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

26:52

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

28:04

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

29:02

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

34:07

Syntax Errors C is a specific language with its own grammar • Syntax - the precise use of a language within its rules • Cis 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

35:19

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

38:01
Lecture 9, COMP1511 - Programming Fundamentals 2020 Term 3
Lecture 9 - Debugging and Characters We're looking at much more complex content now, so our ability to instantly detect and correct errors is going to be tested. We're going to talk about some techniques we can use to try to find and remove bugs (errors) from our code. We'll also be introducing a new variable type: Characters. Adding letters into the data we can store allows us to store more varied information than before.

Follow along using the transcript.

Marc Chee

1.61K subscribers