SAS Certified Base Programmer 50 Questions (4)
A raw data file is listed below.
1---+----10---+----20---+----30---+----40---+----50 TWOSTORY 1040 2 1SANDERS ROAD $55,850 CONDO 2150 4 2.5JEANS AVENUE $127,150
The following program is submitted using this file as input:
data work.houses;
infile 'file-specification';
<insert INPUT statement here>
run;
Which one of the following INPUT statements reads the raw data file correctly?
a.
input @1 style $8.
+1 sqfeet 4.
+1 bedrooms 1.
@20 baths 3.
street 16.
@40 price dollar8;
b.
input @1 style $8
+1 sqfeet 4.
+1 bedrooms 1.
@20 baths 3.
street $16.
@40 price dollar8.;
c.
input @1 style $8.
+1 sqfeet 4.
+1 bedrooms 1.
@20 baths 3.
street $16.
@40 price dollar8.;
d.
input @1 style $8.
+1 sqfeet 4.
+1 bedrooms 1.
@20 baths 3
street 16.
@40 price dollar8.;
Topics:
SAS Base Questions |
7 Comments »
C
Even C is not correct, needs $ after street
Thank you very much. It’s a typo.
Hi Anno, $ is not require after the street, since we specified character informat after the street variable.
I fell Option B and C both are same and correct answers.
option b is incorrect in the 1st line…
I believe with C
Answer is C because A and D reading teh street as Numeric and B is reading style value without Dot($8.)