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

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 many observations will be there in the output dataset person? Data person; infile datalines; input name $ dept $ age; if age le 30; datalines; John Sales 38 Mary Brown Acctng 32 Spielberg Manager 28 ;

  1. 2

  2. 3

  3. 1

  4. 0


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

A SAS code has been executed and it has an error on the 10th line of the code. What will be the value of the automatic variable ERROR?

  1. 0

  2. 10

  3. 1

  4. 11


Correct Option: C

What is the length of variable a ? data temp; a=substr('joshi anand',1,3); run;

  1. 3

  2. 11

  3. 8

  4. 200


Correct Option: B

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