0

programming languages Online Quiz - 119

Description: programming languages Online Quiz - 119
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. The variable JCODE is written to the output data set

  2. The variable JOBCODE is written to the output data set

  3. Neither variable JCODE nor JOBCODE is written to the output dataset

  4. The program fails to execute due to errors


Correct Option: B

data work.sales; do year=1 to 5; do month = 1 to 12; x + 1; end; end; run; which one of the following represents how many observations are written to the WORK.SALES dataset

  1. 0

  2. 1

  3. 5

  4. 60


Correct Option: B

The value 110700 is stored in a numeric variable.which one of the following SAS formats is used to display the value as $110,700.00 in a report.

  1. comma11.2

  2. comma8.2

  3. dollar11.2

  4. dollar8.2


Correct Option: C
  1. proc print data=sasuser.houses; where price lt 60000;where price gt 100000;run;

  2. proc print data=sasuser.houses; where price lt 60000 or price gt 100000;run;

  3. proc print data=sasuser.houses; where price lt 60000 and price gt 100000;run;

  4. proc print data=sasuser.houses; where price lt 60000 or where price gt 100000;run;


Correct Option: B

which one of the following System option displays the time on the report

  1. DATE

  2. TIME

  3. TODAY

  4. DATETIME


Correct Option: A

data work.january; set work.allmonths(keep = product month num_sold cost); if month='Jan' then output work.january; sales = cost * num_sold; keep = product sales; run; which variable does the work.january dataset contain?

  1. product and sales only

  2. product month num_sold cost

  3. product sales month num_sold cost

  4. An incomplete output dataset is created due to syntax errors


Correct Option: D

which one of the following statements is true when SAS encounters a data error in a DATA step?

  1. The DATA step stops executing at the point of the error and no SAS dataset is created

  2. A note is written to the SAS log expalining the error and the DATA step continues to execute

  3. A note appreas in the SAS log that the incorrect data record was saved to a seperate SAS file for further examiantion

  4. The DATA step stops executing at the point of the error and the resulting DATA set contains observations up to that point


Correct Option: B

AI Explanation

To answer this question, we need to understand what happens when SAS encounters a data error in a DATA step.

Option A) The DATA step stops executing at the point of the error and no SAS dataset is created - This option is incorrect. When SAS encounters a data error in a DATA step, it does not necessarily stop executing at the point of the error. Instead, it continues to execute unless specified otherwise.

Option B) A note is written to the SAS log explaining the error and the DATA step continues to execute - This option is correct. When SAS encounters a data error in a DATA step, it writes a note to the SAS log explaining the error and continues to execute the remaining part of the DATA step. This allows SAS to process as much of the data as possible, even if there are errors.

Option C) A note appears in the SAS log that the incorrect data record was saved to a separate SAS file for further examination - This option is incorrect. SAS does not automatically save the incorrect data record to a separate SAS file. However, you can manually code SAS statements to capture and save problematic records for further examination.

Option D) The DATA step stops executing at the point of the error and the resulting DATA set contains observations up to that point - This option is incorrect. As mentioned earlier, SAS does not necessarily stop executing at the point of the error. It continues to execute the remaining part of the DATA step.

Therefore, the correct answer is B. When SAS encounters a data error in a DATA step, a note is written to the SAS log explaining the error, and the DATA step continues to execute.

The contents of the raw data file NAMENUM are listed below: Joe xx The following SAS program is submitted: data test; infile 'namenum'; input name $ number; run; which one of the following is the value of the NUMBER variable?

  1. xx

  2. Joe

  3. .(missing numeric value)

  4. The value cannot be deteremined as the program fails to execute due to errors


Correct Option: C

Local variables do Not get a default value

  1. True

  2. False


Correct Option: A

Is instance variables are overriden?

  1. True

  2. False


Correct Option: B

is it possible to declare the abstract class referece type?

  1. True

  2. False


Correct Option: A
  1. Nothing

  2. Class object

  3. class

  4. calss reference


Correct Option: B
- Hide questions