WGU C949 OBJECTIVE ASSESSMENT 2 EXAM LATEST 2026 ACTUAL
EXAM WITH COMPLETE QUESTIONS AND CORRECT DETAILED
ANSWERS (100% VERIFIED ANSWERS) |ALREADY GRADED A+|
||PROFESSOR VERIFIED|| ||BRANDNEW!!!||
What is the output of the pseudocode below if the variables
declared in the main program are global?
Main
Declare X as Integer, Y as Integer
Set X = 1
Set Y = 2
Call Sub(X, Y)
Write X
Write Y
End Program
Subprogram Sub(Integer Num1, Integer Num2 as Reference)
Declare X as Integer
Set Num1 = 3
Set Num2 = 4
,2|Page
Set X = 5
Write X
End Subprogram - ANSWER-5
14
How many times in this pseudocode is the function F called?
Main
Declare K as Integer
K=3
Set Result = F(K)
Write Result
End Program
Function F(N) as Integer
If N == 1 Then
Set F = 1
Else
Set F = N * F(N - 1)
,3|Page
Set N = N - 1
End If
End Function - ANSWER-3
What is displayed in Step 5 if A = 15 and B = 5 in the pseudocode
below?
Step 1: Start
Step 2: Read A, B
Step 3: C= A*B
Step 4: D=A/B
Step5: Print C
Step 6: Stop - ANSWER-75
What is displayed in step 3 if midterm = 60 and final = 65 in this
pseudocode?
Step 1: Declare midterm, final as integer
Step 2: average = (midterm+final)/2
, 4|Page
Step 3: if (average < 50) then Print "Fail" Else Print "Pass"
endif - ANSWER-Pass
How many times will count++ execute when i = 3, in this
pseudocode?
int count = 0;
int N = 4;
for (int i = 0; i < N; i++)
for (int j = 0; j < i; j++)
count++; - ANSWER-3
At the end of obj, what is the time complexity of inserting in this
pseudocode?
void DynamicArrayAppend(DynamicArray *obj, const void *input)
{
if (obj->logicalSize == obj->capacity - 1) {
obj->capacity *= 2;