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 value stored in the variable x? Data test; name = ’TATA CONSULTANCY SERVICES’; b = ’C’; x = INDEX (name, b); Run;

  1. 2

  2. 23

  3. 6

  4. 5


Correct Option: C

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
  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

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