0

programming languages Online Quiz - 258

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

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

At compile time when an external file is read, what items are created?

  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

Dataset Temp contains 1 observation and 30 variables. Which procedure can be used to convert it into 30 observations with 1 variable in an efficient manner?

  1. Proc tabulate

  2. Proc report

  3. Proc transpose

  4. Proc Invert


Correct Option: C

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

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

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

How will you define the list of variables to be printed in the PRINT procedure?

  1. Weight statement

  2. Var statement

  3. Class statement

  4. By statement


Correct Option: B

You have to sort the dataset Temp by the values of salary in descending order. SORT procedure is given below. Find out the missing statement? Data temp; Infile datalines; Input empname $ salary; Datalines; AAA 25000 BBB 45000 CCC 36000 DDD 47000 ; Proc sort data=temp; <<<<<<>>>>>>>>>; Run;

  1. by descending salary

  2. by salary descending

  3. by salary ascending

  4. by salary


Correct Option: A

How can you assign a value from a datastep to a macro variable?

  1. Using Symget function

  2. Using Symput function

  3. Using Assign function

  4. Using Sysfunc function


Correct Option: B

Can we use title statement inside Proc SQL?

  1. True

  2. False


Correct Option: B

What is the value of x in the following code? %let a=2; %let c=3; %let x=a + c;

  1. 5

  2. Error in the code

  3. 2 + 3

  4. 2 + 3 ;


Correct Option: C

What is the value of z? z=weekday(today()); Today being Wednesday, 30 September 2009

  1. 2

  2. 3

  3. 5

  4. 4


Correct Option: D

What are the different classes of tokens available in SAS?

  1. Literals, Numbers, Strings and Symbols

  2. Literals, Numbers, Names and Special Characters

  3. Literals, Characters, Special Characters and Symbols

  4. Characters and Numbers only


Correct Option: B

What is the use of macro function %SYSFUNC?

  1. Used to execute SAS Functions

  2. Used to execute SAS Statements

  3. Used to pass parameters to a macro function

  4. All of the above


Correct Option: A

In Proc SQL, Index can be created on tables and views. State whether the statement is true or false. Also classify the index types in Proc SQL?

  1. True, Simple and Complex

  2. False, Simple and Composite

  3. True, Simple and Composite

  4. False, Simple and Complex


Correct Option: B
- Hide questions