# Programmer Analyst Test 2

Document Sample

```					Programmer Analyst Test
1. In flowcharting, a cigar-shape would be used to represent
a) getting a keyboard entry from the user
b) the beginning of the flowchart
c) a decision point that determines which of two branches to follow
d) a mathematical calculation
e) none of these

2. In flowcharting, a parallelogram would be used to represent
a) getting a keyboard entry from the user
b) the beginning of the flowchart
c) a decision point that determines which of two branches to follow
d) a mathematical calculation

3. I/O is an abbreviation for
a) inside/out                                           b) input/output
c) on/off                                               d) artificial intelligence

4. In flowcharting, a process symbol always has
a) one flow line in and one flow line out
b) only one flow line in OR one flow line out
c) one flow line in and two flow lines out
d) one flow line in and up to three flow lines out

5. For arithmetic operations, the operation with the highest priority is
a) addition                                             b) subtraction
c) division                                             d) parenthesis

6. The decimal equivalent of the binary number 10000001 is
a) 128                                              b) 65
c) 129                                              d) 1024

7. This flowchart symbol represents which of the following?
a) decision                                    b) terminator
c) process                                     d) all of the above
e) both a and b                                f) both a and c

8. This flowchart symbol represents which of the following?

1
a) decision                                     b) terminator
c) process                                      d) all of the above
e) both a and b                                 f) both a and c

9. If A=5, B=10 and C=15, what would be the result of A * B + B * C ?
a) 1500                                      b) 200
c) 1750                                      d) 100

10. If A=5, B=10 and C=15, what would be the result of (A * B + B) * C ?
a) 1500                                      b) 200
c) 1750                                      d) 900

11. Which flowchart symbol would you use to express the following? Is B <= A/4
a) terminator                                b) process
c) decision                                  d) all of the above

12. Which of the following logical expressions would result in TRUE?
a) 1=0 and 8 < 10                              b) 1=1 and 8 > 10
c) (1=0 and 8 < 10) or 8 > 0                           d) all of the above

13. A program executing the same instructions again and again is know as
a) repeating                                 b) mimicking
c) looping                                   d) regurgitating

14. A group of instructions within a computer program that performs a specific
function is known as a(n)
a) hub                                          b) subroutine
c) master event                                 d) escalator

15. Which of the following would best be used to graphically represent the
scheduling of events within a project?
a) calculator                                  b) Gantt chart
c) flowchart                                   d) television

16. Which of the following is the best description of what a label is?
a) a fixed position within source code           b) the sum of the inputs
c) a description of a product                    d) none of the above

17. Unless explicitly stopped an infinite loop will iterate
a) A finite number of times                       b) infinitely
c) 7 times                                        d) none of the above

18. Which of the following is not considered part of the Project Management
Lifecycle?
a) origination                                 b) initiation
c) manipulation                                d) closeout

2
19. Which of the following may potentially cause problems within a project?
a) lack of resources                           b) unrealistic timeframes
c) changing requirements                       d) all of the above

20. “Scope Creep” refers to
a) uncontrolled changes in a project’s scope             b) a project moving slowly
c) lack of budget or resources                           d) all of the above

21. Scope Creep can be prevented by
a) making technical staff work harder and longer
b) properly defining and documenting system requirements
c) insuring there is enough money to pay for hardware
d) all of the above

22. Which of the following is the correct order of the Project Management
Lifecycle?
a) planning, origination, initiation, closeout
b) origination, initiation, planning, execution and control, closeout
c) startup, construction, testing, release
d) initiation, planning, closeout

23. As part of the Project Initiation phase a project plan is developed with
enough detail to identify any additional resources required to proceed to the next
phase.
TRUE                                                      FALSE

23. Part of the Project Initiation phase is a detailed project plan with
dependencies, exact dates and the assignment of tasks to the team members.
TRUE                                                       FALSE

24. The Project Initiation phase concludes with a decision to halt the project or to
proceed to the Project Planning phase.
TRUE                                                    FALSE

24. During the Project Planning phase deliverables are identified.
TRUE                                                    FALSE

25. Project risks and mitigation plans are not considered part of the Project
Planning phase.
TRUE                                                    FALSE

26. The final phase of Project Planning is a decision to either halt the project or
commit the necessary resources to move on.
TRUE                                                      FALSE

3
Use the flowchart to answer questions 27 -32.

4
27. Using the following values what would the values of H, M, and S be after
completion?
Inputs H=14 M=59 S=16

H = ___________     M=_________ S=___________

28. Using the same values used in question 27 would anything be printed?

YES                                                  NO

29. Using the following values what would the values of H, M, and S be after
completion?
Inputs H=60 M=60 S=60

H = ___________     M=_________ S=___________

30. Using the same values used in question 29 would anything be printed?

YES                                                  NO

31. Using the following values what would the values of H, M, and S be after
completion?
Inputs H=12 M=0 S=59

H = ___________     M=_________ S=___________

32. Using the same values used in question 31 would anything be printed?

YES                                                  NO

Pseudo Code Directions
Use the following instructions to answer the questions based on the block
of code provided.

The code used for this example is not case sensitive.

The PRINT function displays its input parameter to the output device.

Example PRINT(‘Hello world’) will result in an output of the following
Hello world

SUBSTRING is a function that returns a subset of characters in a string.
The first parameter represents the string to be evaluated, the second

5
parameter indicates the starting point within the string and the third
parameter indicates how many characters to return.

Example - SUBSTRING(‘TESTME’,2,4) would result in ESTM.
(TESTME)

Variables declared as INTEGER will truncate any value to the right of a
decimal point.

Example – If the variable V_COUNT is defined as type INTEGER and
you set the value to 3.2 it will be truncated to 3.

Variables declared as a CHARACTER may include alphanumeric characters
and have a length no greater than 255.

If a variable is not explicitly initialized it will have an implicit value of 0 for
integers and an empty string for characters.

Loops are defined by the number of iterations that are to be performed.
The counter variable is automatically incremented for each iteration.

Example - Loop for x = 1 to x = 10
PRINT(x)
End loop
The above code sample would result in printing the numbers 1 through 10.

Conditional logic is performed through IF-THEN-ELSE statements.

Example - X = 55

IF X > 55 THEN
X = 100
ELSE
X = X -1
END IF
The above code block would result in setting the value of X = 54. (55-1)

6
Use the following code block to answer questions 33 – 40.

DECLARE
V_string CHARACTER
V_temp    INTEGER
V_temp2 INTEGER

BEGIN
V_string = ‘abcdefghijklmnopqrstuvwxyz’

Loop for y = 1 to y = 5
v_temp = y / .3
v_temp2 = v_temp2 + v_temp

IF v_temp > 6 THEN
PRINT(SUBSTRING(v_string,v_temp,4))
ELSE
PRINT(v_temp)
END IF

End loop

PRINT(v_temp2)

END

33. What is the value of v_temp after completion?

34. What is the value of v_temp2 after completion?

35. List out in correct order the values that will be sent to the output device by
the PRINT function.

36. How many iterations will this loop perform?

37. List in correct order the values of v_temp for each iteration.

38. Within the loop how many times was the value of v_temp printed?

39. Within the loop how many times was the SUBSTRING function called?

40. After the third iteration of the loop what was the value of v_temp2?

7

```
DOCUMENT INFO
Shared By:
Categories:
Stats:
 views: 57 posted: 2/1/2010 language: English pages: 7
How are you planning on using Docstoc?