Anda di halaman 1dari 8

Question1:

What digit would be in the units place of the number 1! + 2! + 3! + . . . + 99!?


Question2:
A 5 member committee is to be formed by selecting 5 people at random from a
group of 4 males and 6 females. Find the probability that the committee has at
least 2 males.
Question3:
At a party, if the number of gifts exchanged among a group of guests is 90, then
what is the number of guests present in the party? Each of them exchanged gifts
with each other.
Question4:
A rabbit is sitting on the origin and can move along at the x-axis in either direction
(with equal probability) one unit at a time. It decides to take 11 such moves, what is
the probability that it is just one positive unit away from the origin from where it
started?
Question 5:
What is the remainder when 7^84 is divided by 342?
Question 6:
The following SAS FORMAT procedure is submitted:
proc format lib = sasuser;
value tempc low < 0 = 'BELOW FREEZING'
0 < 5 = 'COLD'
5 < 10 = 'MILD'
10 < 15 = 'WARM'
15 high = 'HOT';
run;
How is the value 10 displayed when the format TEMPC is applied?
A. 10
B. MILD
C. WARM
D. BELOW FREEZING

Question 7:
The following SAS program is submitted:
%macro execute;
<insert statement here>
proc print data = sasuser.houses;
run;
%end;
%mend;

Antuit India Pvt. Ltd.,


J.P Classic, 2nd floor, 157/1, Corporate Block I,
EPIP Phase II, KIADB Whitefield, Bangalore -560066

Which of the following completes the above program so that it executes on Tuesday?
A. %if &sysday = Tuesday %then %do;
B. %if &sysday = 'Tuesday' %then %do;
C. %if "&sysday" = Tuesday %then %do;
D. %if '&sysday' = 'Tuesday' %then %do;

Question 8:
The following SAS program is submitted:
data one;
do i = 1 to 10;
ptobs = ceil(ranuni(0) * totobs);
set temp point = ptobs
nobs = totobs;
output;
end;
stop;
run;
The SAS data set TEMP contains 2,500,000 observations. Which one of the following represents the
possible values for PTOBS?
A. any integer between 1 and 10
B. any real number between 0 and 1
C. any integer between 1 and 2,500,000
D. any real number between 1 and 2,500,000

Question 9:
Which one of the following programs contains a syntax error?
A.
proc sql;
select product.*, cost.unitcost, sales.quantity
from product p, cost c, sales s
where p.item = c.item and
p.item = s.item;
quit;
B.
proc sql;
select product.*, cost.unitcost, sales.quantity
from product, cost, sales
where product.item = cost.item and
product.item = sales.item;
quit;

Antuit India Pvt. Ltd.,


J.P Classic, 2nd floor, 157/1, Corporate Block I,
EPIP Phase II, KIADB Whitefield, Bangalore -560066

C.
proc sql;
select p.*, c.unitcost, s.quantity
from product as p, cost as c, sales as s
where p.item = c.item and
p.item = s.item;
quit;
D.
proc sql;
select p.*, c.unitcost, s.quantity
from product, cost, sales
where product.item = cost.item and
product.item = sales.item;
quit;

Question 10:
The following SAS code is submitted:
%macro houses(dsn = houses,sub = RANCH);
data &dsn;
set sasuser.houses;
if style = "&sub";
run;
%mend;
%houses(sub = SPLIT)
%houses(dsn = ranch)
%houses(sub = TWOSTORY)
Which one of the following is the value of the automatic macro variable SYSLAST?
A. work.ranch
B. work.houses
C. WORK.RANCH
D. WORK.HOUSES

Question 11:
The following SAS program is submitted:
data work.one;
x = 3; y = 2; z = x **y;
run;
Which one of the following is the value of the variable Z in the output data set?
a. 6
b. 9
c. . (missing numeric value)
d. The program fails to execute due to errors.

Question 12:
Antuit India Pvt. Ltd.,
J.P Classic, 2nd floor, 157/1, Corporate Block I,
EPIP Phase II, KIADB Whitefield, Bangalore -560066

The following SAS program is submitted:


data totalsales;
set monthlysales(keep = year product sales);
retain monthsales {12}; array monthsales {12};
do i = 1 to 12;
monthsales{i} = sales;
end;
cnt + 1; monthsales{cnt} = sales;
run;
The data set named MONTHLYSALES has one observation per month for each of five
years for a total of 60 observations. Which one of the following is the result of the
above program?
a. The program fails execution due to data errors.
b. The program fails execution due to syntax errors.
c. The program runs with warnings and creates the WORK.TOTALSALES data set
with 60 observations.
d. The program runs without errors or warnings and creates the WORK.TOTALSALES
data set with 60 observations.
Question 13:
The following SAS program is submitted:
data work.test;
Author = Christie, Agatha;
First = substr(scan(author,2, ,),1, 1);
run;
Which one of the following is the value of the variable FIRST in the output data set?
a. C
b. A
c. Agatha
d. (missing character value)
Question 14:
The following SAS program is submitted:
%macro check(num=4);
%let result=%sysevalf(&num+0.5);
%put Result is &result;
%mend;
%check(num=10);

What is the written to the SAS log?


a. Result is
Antuit India Pvt. Ltd.,
J.P Classic, 2nd floor, 157/1, Corporate Block I,
EPIP Phase II, KIADB Whitefield, Bangalore -560066

b. Result is 10+0.5
c. Result is 10.5
d. Result is 4.5
Question 15:
The following SAS program is submitted:
%let first=name;
%let last=first;
%put &&&last;
What is written to the SAS Log?
a. First
b. &&First
c. name
d. &name
Question 16:
The following SAS program is submitted:
%let lib = %upcase(sasuser);
proc sql;
select nvar
from dictionary.tables
where libname = "&lib";
quit;
Given that several SAS data sets exist in the SASUSER library, which one of the
following is generated as output?
a. No result set
b. A syntax error in the log
c. A report showing the names of each table in SASUSER
d. A report showing the number of columns in each table in SASUSER
Question 17:
The value 110700 is stored in a numeric variable named SALARY. Which FORMAT
statement displays the value as $110,700.00 in a report?
a. format salary comma11.2;
b. format salary dollar8.2;
c. format salary dollar11.2;
d. format salary comma8.2 dollar8.2;
Question 18:
Which one of the following is true when SAS encounters a data error in a DATA step?
a. The DATA step stops executing at the point of the error, and no SAS data set is
created.
b. A note is written to the SAS log explaining the error, and the DATA step continues
to execute.
Antuit India Pvt. Ltd.,
J.P Classic, 2nd floor, 157/1, Corporate Block I,
EPIP Phase II, KIADB Whitefield, Bangalore -560066

c. A note appears in the SAS log that the incorrect data record was saved to a
separate SAS file for further examination.
d. The DATA step stops executing at the point of the error, and the resulting DATA
set contains observations up to that point.
Question 19:
The following SAS program is submitted:
%macro test(var);
%let jobs = BLACKSMITH WORDSMITH SWORDSMITH;
%let type = %index(&jobs,&var);
%mend;
%test(SMITH)
Which one of the following is the resulting value of the macro variable TYPE?
a. 0
b. 3
c. 6
d. Null

Question 20:
The following SAS program is submitted:
options yearcutoff = 1950;
%macro y2kopt(date);
%if &date >= 14610 %then %do;
options yearcutoff = 2000;
%end;
%else %do;
options yearcutoff = 1900;
%end;
%mend;
data _null_ ;
date = "01jan2000"d;
call symput("date",left(date));
run;
%y2kopt(&date)
The SAS date for January 1, 2000 is 14610 and the SAS system option for YEARCUTOFF is set to 1920
prior to submitting the above program. Which one of the following is the value of YEARCUTOFF when the
macro finishes execution?
a.
b.
c.
d.

1900
1920
1950
2000

Question 21:
The following SAS ARRAY statement is submitted:
array score{*} a4 - a10, a25;

Antuit India Pvt. Ltd.,


J.P Classic, 2nd floor, 157/1, Corporate Block I,
EPIP Phase II, KIADB Whitefield, Bangalore -560066

Which one of the following is the maximum number of elements stored?


a. 3
b. 7
c. 8
d. 11

Question 22:
The following SAS program is submitted:
%let a = cat;
%macro animal(a = frog);
%let a = bird;
%mend;
%animal(a = pig)
%put a is &a;
Which one of the following is written to the SAS log?
a. a is &a
b. a is cat
c. a is pig
d. a is bird

Question 23:
The following SAS program is submitted:
data two;
y = '2';
run;
%let x = 10;
%let var = y;
data one;
set two (keep = &var);
z = &var * &x;
run;
Which one of the following is the value of the variable Z when the program finishes execution?
a. _ERROR_
b. 20 (as a numeric)
c. 20 (as a character)
d. (missing numeric)

Question 24:
The following SAS program is submitted:
data work.total;
set work.salary(keep = department wagerate);
by department;

Antuit India Pvt. Ltd.,


J.P Classic, 2nd floor, 157/1, Corporate Block I,
EPIP Phase II, KIADB Whitefield, Bangalore -560066

if first.department then payroll = 0;


payroll + wagerate;
if last.department;
run;
The SAS data set WORK.SALARY, currently ordered by DEPARTMENT, contains 100
observations for each of 5 departments. Which one of the following represents how many observations
the WORK.TOTAL data set
contains?
a. 5
b. 20
c. 100
d. 500

Question 25:
The following SAS program is submitted:
data work.report;
set work.sales_info;
if qtr(sales_date) ge 3;
run;
The SAS data set WORK.SALES_INFO has one observation for each month in the year 2000
and the variable SALES_DATE which contains a SAS date value for each of the twelve months.
How many of the original twelve observations in WORKSALES_INFO are written to the
WORKREPORT data set?
A. 2
B. 3
C. 6
D. 9

Antuit India Pvt. Ltd.,


J.P Classic, 2nd floor, 157/1, Corporate Block I,
EPIP Phase II, KIADB Whitefield, Bangalore -560066

Anda mungkin juga menyukai