0
Alien head

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

What is the super calss of class?

  1. Nothing

  2. Class object

  3. class

  4. calss reference


Correct Option: B

is it possible to declare the abstract class referece type?

  1. True

  2. False


Correct Option: A

Is instance variables are overriden?

  1. True

  2. False


Correct Option: B

Local variables do Not get a default value

  1. True

  2. False


Correct Option: A

The same method name , same argumentlist But different return type is called as

  1. overload method

  2. override method

  3. ploymorphism

  4. none


Correct Option: D

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

$1,234 The following SA sprogram is submitted data test; infile 'amount'; input @1 salary 6.; run; which one of the following is the value of the salary variable?

  1. 1234

  2. 1,234

  3. $1,234

  4. .(missing numeric value)


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

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 System option displays the time on the report

  1. DATE

  2. TIME

  3. TODAY

  4. DATETIME


Correct Option: A

A realtor has two customers.One customer wants to view a list of homes selling for less than $60,000.the other customer wants to view a list of homes selling for greater than $100,000.Assuming the PRICE variable is numeric,which one of the following PRINT procedure steps will select all desired observations.

  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

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

The SAS dataset BANKS is listed below: BANKS name rate Capital 0.0718 Direct 0.0721 Virtual 0.0567 The following SAS program is submitted: data newbank; do year =1 to 3; set banks; capital + 5000; end; run; Which one of the following represents how many observations and variables will exist in the SAS dataset NEWBANK?

  1. 0 observations and 0 variables

  2. 1 observation and 4 variables

  3. 3 observatiosn and 3 variables

  4. 9 observations and 2 variables


Correct Option: B

data work.clients; calls= 6; do while (calls le 6); calls+1; end; run; which one of the following is the value of the variable CALLS in the output data set

  1. 4

  2. 5

  3. 6

  4. 7


Correct Option: D

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

Input data is provided: squash 1.10 apples 2.25 juice 1.69 The following SAS program is submitted using the raw data file above: data groceries; infile 'file-specification'; input item $ cost; ---------------- run; Which one of the following completes the program and produces a grand total for all COST values?

  1. grandtot = sum cost

  2. grandtot = sum(grandtot,cost)

  3. retain grandtot 0;grandtot + cost;

  4. grandtot = grandtot+ cost


Correct Option: C

data work.company; set work.dept1(keep=jobcode) work.dept2(rename=(jcode=jobcode)); run; which one of the following is the result?

  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.passengers; if origpassengers=. then origpassengers = 100; transpassengers = 100; origpassengers = .; nonpaying = 10; totalpassengers = sum(origpassengers ,transpassengers); run; Which one of the following is the value of the TOTALPASSENGERS variable in the output dataset?

  1. 100

  2. 110

  3. 200

  4. missing


Correct Option: B

data work.passengers; if origpassengers=. then origpassengers = 100; transpassengers=100; origpassengers=.; nonpaying=10; totalpassengers = origpassengers + Transpassengers; run; which one of the following is the value of the totalpassengers variable in the output data set?

  1. 100

  2. 110

  3. 200

  4. missing


Correct Option: D

data work.flights; destination='cph'; select(destination); when('LPR') city='London'; when('CPH') city = 'Copenhagen'; otherwise city='Other'; end; run; which one of the following is the value of the CITY variable?

  1. Other

  2. Copenh

  3. Copenhagen

  4. Missing


Correct Option: A
+ View questions