vault backup: 2024-11-01 13:28:59

This commit is contained in:
zleyyij 2024-11-01 13:28:59 -06:00
parent 0cbe502348
commit 0870e5ab2b

View File

@ -21,9 +21,10 @@ int i;
*sum = 0.0;
for (i = 0; i < n; i++)
// This wasn't increasing the value
// `sum` points to, it was modifying the address the pointer po
// `sum` points to, it was modifying the address stored in the pointer
(*sum) += a[i];
avg = sum / n;
// Missing dereference operators
*avg = *sum / n;
}
```