Skip to main content\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 9.4 Arrays-WE2-P1
Subsection 9.4.1 Subgoals for Evaluating Arrays
Set up array from 0 to size-1
Evaluate data type of statements against array
-
Trace statements, updating slots as you go
Remember assignment subgoals
Subsection 9.4.2 Arrays-WE2-P1
Assume the following given declarations:
Give the contents of alpha after the execution of these statements.
alpha = new int[10];
for (int i = 0; i < 10; i++)
alpha[i] = i * i;
Exercises Exercises
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
You have attempted
of
activities on this page.