From fc0ef3203eadd594bf446416d16c620e45009575 Mon Sep 17 00:00:00 2001 From: Juan Santelices <86135408+jdsantelicesl@users.noreply.github.com> Date: Fri, 29 May 2026 14:03:40 -0700 Subject: [PATCH] Fix print output example in arrays.md Updated the print output example to reflect the correct value of the array size calculation. --- content/c-pointers-arrays-strings/arrays.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/c-pointers-arrays-strings/arrays.md b/content/c-pointers-arrays-strings/arrays.md index e8a1d6f..ade25de 100644 --- a/content/c-pointers-arrays-strings/arrays.md +++ b/content/c-pointers-arrays-strings/arrays.md @@ -245,7 +245,7 @@ Assume a 64-bit architecture where `short`s are 16 bits. When @code-array-sizeof :::{note} Show Answer :class: dropdown -Print output: `0 5 8` +Print output: `10 5 8` * In Line 10, `sizeof(nums)` is in array’s declared scope. Evaluate to the total array size of five `short`s, i.e., 10. * In Line 4, the value `len` is the result of evaluating `sizeof(nums)/sizeof(short)` in `main`, i.e., 10/2 = 5. @@ -313,4 +313,4 @@ Choose formal parameter definitions wisely. :::{warning} Reminder 4 Always pass in array lengths. See @sec-array-decay. -::: \ No newline at end of file +:::