Quiz:
Processing
Variables with Arrays
Select the best answer for each question and click Score My Quiz.
-
Which statement is false
regarding an ARRAY statement?
-
What belongs within the parentheses
of this ARRAY statement?
array contrib( ) qtr1-qtr4;
-
For the program below, select
an iterative DO statement to process all elements in the CONTRIB array.
data work.contrib;
array contrib(4) qtr1-qtr4;
...
contrib(i)=contrib(i)*1.25;
end;
run;
-
What is the value of the index
variable that references
Jul in the statements below?
array qua(4) jan apr jul oct;
do i=1 to 4;
yeargoal=qua(i)*1.2;
end;
-
Which DO statement would not
process all the elements in the FACTORS array shown below?
array factors{*} age height weight bloodpr;
-
Which statement below is false
regarding the use of arrays to create variables?
-
For the first observation, what
is the value of DIFF(i) at the end of the second
iteration of the DO loop?
|
192 |
200 |
215 |
137 |
130 |
125 |
220 |
210 |
213 |
|
array wt{*} weight1-weight10;
array diff{9};
do i=1 to 9;
diff(i)=wt(i+1)-wt(i);
end;
-
Finish the ARRAY statement below
to create temporary array elements with initial values of
9000 ,
9300 , 9600 , and 9900 .
array goal(4) ... ;
-
Based on the ARRAY statement below,
select the array reference for the array element
Q50 .
array ques(3,25) q1-q75;
-
Select the ARRAY statement that
defines the array in the following program.
data rainwear.coat;
input category high1-high3 / low1-low3;
...
do i=1 to 2;
do j=1 to 3;
compare(i,j)=round(compare(i,j)*1.12);
end;
end;
run;
|