0

programming languages Online Quiz - 257

Description: programming languages Online Quiz - 257
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

What is the use of %INCLUDE statement in a program?

  1. Includes external files

  2. Includes SAS datasets

  3. Includes variables from other datasets

  4. All of the above


Correct Option: A

What is the SAS data value of 01-Jan-1960?

  1. 21916

  2. 1

  3. 0

  4. None of the above


Correct Option: C

How many variables will be there in the output dataset totmark? Data totmark; Set scores (keep=name mark1 mark2 ); Total = mark1 + mark2; Drop mark1 mark2; Run;

  1. 2

  2. 4

  3. 5

  4. 1


Correct Option: A
  1. numeric will be represented by blank and character will be represented by .

  2. both character and numeric will be represented as blanks

  3. numeric will be represented by . and character will be represented by blank

  4. numeric will be represented by . and character will be represented by NULL values


Correct Option: C

How does the following macros will resolve? What will be the output in log file? %let one=two; %let two=three; %let three=one; %put &one; %put &&one; %put &&&one;

  1. two, two, one

  2. two, three, one

  3. two, two, three

  4. two, two, two


Correct Option: C

Which of the following can be used to read numeric values that contain numeric values and commas into a SAS dataset?

  1. comma. informat

  2. dollar. format

  3. comma. format

  4. w.d informat


Correct Option: A
  1. Program data vector (PDV) and Descriptor portion

  2. Input buffer, Program data vector (PDV) and Descriptor portion

  3. Input buffer and Descriptor portion

  4. None of the above


Correct Option: B

What does the line hold specifier single trailing(@) do when used in an input statement?

  1. holds the input record for the next INPUT statement to read in the same iteration of the DATA step

  2. holds the input record for the next INPUT statement to read across further iterations of the DATA step

  3. holds the input record for the current input statement to read across further iterations of the DATA step

  4. All of the above


Correct Option: A

What is the output of the following sum statement? X1=9, X2=4, X3=1 Z=sum(of X1-X3);

  1. 8

  2. 10

  3. 14

  4. 12


Correct Option: C

What is the use of PUT function in a DATA step?

  1. converts character to numeric

  2. onverts numeric to character

  3. writes the values to the output file

  4. None of the above


Correct Option: B

I want to create a 2 way cross tabulation frequency based on Country and Sales using FREQ procedure. From the given options pick the correct code?

  1. Proc freq; Tables country sales; Run;

  2. Proc freq; Table country sales; Run;

  3. Proc freq; Tables country * sales; Run;

  4. Proc freq; Table country * sales; Run;


Correct Option: C

Which procedure can be used to see the descriptor portion of a dataset?

  1. Proc freq

  2. Proc print

  3. Proc datasets

  4. Proc contents


Correct Option: D

Find out the error in the following code? Libname output_dir “c:\mydocuments\output”; Data output_dir.test; Infile datalines dlm=’,’; Input name $ total; If total > 50; Datalines; Sharma,50 Thiyaga,90 Ashok,60 Run;

  1. No Errors

  2. Error in the LIBNAME Statement

  3. Error in the Datalines statement

  4. Error in the infile statement


Correct Option: B
- Hide questions