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