Question 25: For the first observation, what is the value of diff{i} at the end of the second iteration of the DO loop? array wt{*} obs1-obs10; array diff{9}; do i=1 to 9; diff{i}=wt{i+1}-wt{i}; end;

  1. 15
  2. Get all Questions and Answer from here
  3. You need to have paid subscription to access all questions
  4. Thanks for considering SAS Certification Material

 Correct Answer : 1

 Exp : At the end of the second iteration, diff{i} resolves as follows: diff{2}=wt{2+1}-wt{2}; diff{2}=215-200

 In the DO statement, you specify the index variable that represents the values of the array elements. Then specify the start and stop positions of the array elements. Example : Using the Iterative DO Statement without Infinite Looping In each of the following examples, the DO group executes ten times. The first example demonstrates the preferred approach.

You can access to full explanation to question and answer from this page.