Premium

Base SAS Certified Associate: Programming Fundamentals Using SAS Questions and Answers (Dumps and Practice Questions)



Question : You need to find that how many year it will take to reach your INR investment every year with % compounding interest rate to have
100000 or more, which of the following you will consider?

 : You need to find that how many year it will take to reach your INR investment every year with % compounding interest rate to have
1. Do loop

2. DO Until loop

3. Access Mostly Uused Products by 50000+ Subscribers

4. Where condition


Correct Answer : Get Lastest Questions and Answer :
Explanation: As we know, what should be our final value. In this case our final value is more than 100000 INR. So we can use DO UNTIL loop.
Because we dont know, how many years it will take, hence not aware about the number iterations. So simple DO loop is not helpful. IF and where
conditions is also not helpful. See example below

data course100 (drop=index);
do until(TOTAL_INCOME>100000);
TOTAL_INCOME+5000;
TOTAL_INCOME+TOTAL_INCOME*.10;
YEAR+1;
output;
put _all_;
end;
run;






Question : Which of the following statements are correct, with regards to DO UNTIL statement

A. DO UNTIL statement will always execute enclosed statements at least once.
B. DO UNTIL statement may not execute enclosed statements if condition is true at the start.
C. All the enclosed statements will be executed if condition until become true.
D. END; statement is not mandatory its optional.


 : Which of the following statements are correct, with regards to DO UNTIL statement
1. A,B
2. B,C
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,C
5. B,D

Correct Answer : Get Lastest Questions and Answer :
Explanation: Any looping statement required END; statement to close. Hence, option 4 is out. When you use Do UNTIL, it will execute it at
least once. Option 3 is also correct, until condition become true all the enclosed statements will be executed. As soon as until become true it will exit.




Question : You have been given a below SAS program

data course100 (drop=index);
do until(TOTAL_INCOME>100000);
TOTAL_INCOME+5000;
TOTAL_INCOME+TOTAL_INCOME*.10;
YEAR+1;
output;
put _all_;
end;
run;

Select the DO while statement which can be replace with the DO UNTIL statement?

 : You have been given a below SAS program
1. do while(TOTAL_INCOME>100000);

2. do while(TOTAL_INCOME<100000);

3. Access Mostly Uused Products by 50000+ Subscribers

4. do until(TOTAL_INCOME <> 100000);


Correct Answer : Get Lastest Questions and Answer :
Explanation: In case of while statement, if first statement become false than, while loop will never be executed. Hence, in option condition
become true TOTAL_INCOME<100000, so it will be executed until condition become false.


Related Questions


Question : The following SAS program is submitted:
libname company 'SAS-data-library';
proc sort data = employee.payroll;
by EmployeeIDNumber;
run;
Write access has been granted to the EMPLOYEE library.
Which one of the following represents how the observations are sorted?
 : The following SAS program is submitted:
1. EMPLOYEE.PAYROLL is recreated in sorted order by EmployeeIDNumber.
2. EMPLOYEE.PAYROLL is stored in original order, and a new data set PAYROLL is created in sorted order by
EmployeeIDNumber.
3. EMPLOYEE.PAYROLL is stored in original order, and a new data set COMPANY.PAYROLLSORTED is created in sorted order
by EmployeeIDNumber.
4. EMPLOYEE.PAYROLL is recreated in sorted order by EmployeeIDNumber, and a new data set PAYROLL is created in sorted
order by EmployeeIDNumber.


Question : The SAS data set EMPLOYEE_INFO is listed below:
IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info;

run;
Which one of the following BY statements completes the program and sorts the data sequentially by ascending expense values within
each ascending IDNUMBER value?
 : The SAS data set EMPLOYEE_INFO is listed below:
1. by Expenses IDNumber;
2. by IDNumber Expenses;
3. Access Mostly Uused Products by 50000+ Subscribers
4. by ascending IDNumber ascending Expenses;


Question : The SAS data set WORK.AWARDS is listed below:
fname points
Amy 2
Amy 1
Gerard 3
Wang 3
Wang 1
Wang 2
The following SAS program is submitted:
proc sort data = work.awards;
by descending fname points;
run;
Which one of the option from left image represents how the observations are sorted?
 : The SAS data set WORK.AWARDS is listed below:
1.
2.
3. Access Mostly Uused Products by 50000+ Subscribers
4.


Question : The observations in the SAS data set EMPLOYEE.TEST are ordered by the values of the variable SALARY.
The following SAS program is submitted:
proc sort data = employee.test out = employee.testsorted;
by name;
run;
Which one of the following is the result of the SAS program?
 : The observations in the SAS data set EMPLOYEE.TEST are ordered by the values of the variable SALARY.
1. The data set EMPLOYEE.TEST is stored in ascending order by values of the NAME variable.
2. The data set EMPLOYEE.TEST is stored in descending order by values of the NAME variable.
3. Access Mostly Uused Products by 50000+ Subscribers
4. The data set EMPLOYEE.TESTSORTED is stored in descending order by values of the NAME variable.


Question : Which one of the following statements is true regarding the name of a SAS array?

 : Which one of the following statements is true regarding the name of a SAS array?
1. It is saved with the data set.
2. It can be used in procedures.
3. Access Mostly Uused Products by 50000+ Subscribers
4. It can be the same as the name of a variable in the data set.


Question : The following SAS program is submitted:
data stats;
set revenue;
array weekly{5} mon tue wed thu fri;

total = weekly{i} * .25;
output;
end;
run;
Which one of the following DO statements completes the program and processes the elements of the WEEKLY array?
 : The following SAS program is submitted:
1. do i = 1 to 5;
2. do weekly{i} = 1 to 5;
3. Access Mostly Uused Products by 50000+ Subscribers
4. A DO loop cannot be used because the variables referenced do not end in a digit.