By admin | September 22, 2009

SAS Certified Base Programmer 123 Questions (69)

A raw data file is listed below:

----|----10---|----20---|----30
squash 1.10
apples 2.25
juice 1.69

The following SAS program is submitted using the raw data file above:

data groceries;
    infile'file-specification';
    input item $ cost;
    <insert statement(s) here>

Which one of the following completes the program and produces a grand total for all COST values?

A.
grandtot = sum cost;

B.
grandtot = sum(grandtot,cost);

C.
retain grandtot 0;
grandtot = sum(grandtot,cost);

D.
grandtot = sum(grandtot,cost);
output grandtot;

One comment | Add One

  1. admin - 09/22/2009 at 11:08 am

    C

Leave a Comment

Leave a Reply

Your email address will not be published.