diff --git a/education/software development/ECE1400/Chapter 17 Exercises.md b/education/software development/ECE1400/Chapter 17 Exercises.md index e57b3a3..b1295c5 100644 --- a/education/software development/ECE1400/Chapter 17 Exercises.md +++ b/education/software development/ECE1400/Chapter 17 Exercises.md @@ -43,5 +43,13 @@ The above loop won't function because it deallocates the entry, then attempts to A functional example might look like this: ```c struct entry* p = first; +while (p != NULL) { + void *current = p; + p = p->next; + free(p); +} +``` -``` \ No newline at end of file +--- + +> **9.** True or false: If `x` is a structure and `a` is a member of that structure, then `(&x)->a` is the same as `x.a`. Justify your answer \ No newline at end of file