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.5 Arrays-WE2-P2
Subsection 9.5.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.5.2 Arrays-WE2-P2
Assume the following given declarations:
Give the contents of alpha after the execution of these statements.
beta = new int[6];
beta[0] = 50;
for (int i = 1; i < 6; i++)
beta[i] = beta[i-1];
Exercises Exercises
1.
2.
3.
4.
5.
6.
You have attempted
of
activities on this page.