SAS Base Certification – Question 3

Question 3: Given the text file COLORS.TXT:

----+----1----+----2----+----
RED    ORANGE  YELLOW  GREEN
BLUE   INDIGO  PURPLE  VIOLET
CYAN   WHITE   FUCSIA  BLACK
GRAY   BROWN   PINK    MAGENTA

The following SAS program is submitted:

1
2
3
4
5
data WORK.COLORS;
  infile 'COLORS.TXT';
  input @1 Var1 $ @8 Var2 $ @;
  input @1 Var3 $ @8 Var4 $ @;
run;

What will the data set WORK.COLORS contain?

Options:

A.	
Var1 Var2 Var3 Var4 ------ ------ ------ ------ RED ORANGE RED ORANGE BLUE INDIGO BLUE INDIGO CYAN WHITE CYAN WHITE GRAY BROWN GRAY BROWN B.
Var1 Var2 Var3 Var4 ------ ------ ------ ------ RED ORANGE BLUE INDIGO CYAN WHITE GRAY BROWN C.
Var1 Var2 Var3 Var4 ------ ------ ------ ------ RED ORANGE YELLOW GREEN BLUE INDIGO PURPLE VIOLET D.
Var1 Var2 Var3 Var4 ------ ------ ------ ------ RED ORANGE YELLOW GREEN BLUE INDIGO PURPLE VIOLET CYAN WHITE FUCSIA BLACK GRAY BROWN PINK MAGENTA

*The SAS certification sample problem and answer above are sourced from the official SAS sample questions page. All answer logs, data sets, output, and commentary are provided by this blog.

Correct Answer

Incorrect Answer

Click to see Answer Explanation below

thanks for your support

3 Comments

    Karan Verma May 28, 2015

    The trailing @ should be explained here, because of the trailing @ the results are coming the way, they are.

    Reply
        Utkarsh Oct 05, 2016

        Hi Hee jung, Above link does not exist any more, can you please help with a new Link if available.

        Reply

Leave a Comment

Please keep in mind that comments are moderated and rel="nofollow" is in use. So, please do not use a spammy keyword or a domain as your name, or it will be deleted. Let us have a personal and meaningful conversation instead.