A00-211 Exam QuestionsBrowse all questions from this exam

A00-211 Exam - Question 40


The SAS data set BANKS is listed below:

BANKS -

name rate

FirstCapital 0.0718 -

DirectBank 0.0721 -

VirtualDirect 0.0728 -

The following SAS program is submitted:

data newbank;

do year = 1 to 3;

set banks;

capital + 5000;

end;

run;

Which one of the following represents how many observations and variables will exist in the SAS data set NEWBANK?

Show Answer
Correct Answer: B

The SAS program reads the BANKS data set with the SET statement and processes each observation within a DO loop that iterates three times, but the resulting data set NEWBANK will contain only one observation (since there is no OUTPUT statement inside the DO loop). The variables in the NEWBANK data set will be: 'name', 'rate', 'year', and 'capital', totaling 4 variables. Thus, the correct answer is 1 observation and 4 variables.

Discussion

3 comments
Sign in to comment
Mandar77Option: B
Jun 23, 2022

There is no Output statement thus it will always return 1 observation. Regarding variable 2 from table in set statement , year and capital = 4 variables. Answer B is right

KleinstoneOption: D
Jan 4, 2021

this question is confusing. it seems there are 9 observations and 3 variables.

KleinstoneOption: B
Jan 19, 2021

yes. the choice is B.