Professional Documents
Culture Documents
1
1
Exam aids: This is a closed-book exam. The only student materials allowed are pencils,
erasers and an approved paper (not electronic) English-Chinese dictionary.
General Instructions: Write your answers on separate sheets of paper and do not write your
answers on the pages of the exam. Start each section of the exam on a new sheet of paper.
Write on only one side of each answer sheet and put your name at the top of each answer
sheet. If the question is unclear to you, explain the ambiguity and your interpretation of the
question in your answer. Try to answer all of the exam questions and use illustrations in order
to get partial credit for the question. However, if the question asks for exactly two responses,
do not answer with three or more alternative answers.
Note that some of the questions related to Chapter 2 (Data Manipulation) refer to
Appendix 1: language description table on the last page of this exam.
Scoring: There are a total of 75 questions and a maximum of 100 points in this exam. At least
50% of the maximum number of points must be scored in order to get a passing grade. The
ECTS scale will be used on all passing grades (i.e., grades of A, B, C, D and E will be given).
The questions are not listed in order of difficulty.
GOOD LUCK!
Chapters 1 - 5
1
1.1 What is the result of the binary operation 11110000 OR 00001111 ?
ANSWER: D
1.2 What is the base ten value of the binary fraction 101.100 ?
ANSWER: A
1.3 Which of the following instructions falls into the category of data transfer instructions?
1.4 When a STORE operation is performed, what information besides the data to be stored
must be sent over the bus to main memory by the CPU?
ANSWER: D
1.5 The end of a time slice is indicted by the occurrence of a signal called
ANSWER: C
1.6 Which of the following items of information would not be contained in an operating
system’s process table?
ANSWER: B
1.7 What is the name of the rules that are used to conduct computer network activities?
ANSWER: A
1.8 Which layer of the TCP/IP hierarchy directs message segments through the Internet so that
they get closer and closer to their destination?
2
ANSWER: C
1.9 Which of the following set of instructions defines an algorithm in the formal, strict sense?
A. X ← 3; B. X ← 3; C. X ← 3;
while (X < 5)do while (X < 5) do while (X < 5) do
(X ← X) (X ← X - 1) (X ← X + 1)
ANSWER: C
which of the following entries will take the least time to find using the binary search algorithm?
ANSWER: A
ANSWER: B
1.12What is a set of instructions for performing a task that can be used as an abstract tool by
other program units?
ANSWER: B.
ANSWER: B
ANSWER: D
1.15What is the conceptual shape or arrangement of data in a program to which variables are
often associated (in addition to data type)?
3
D. heterogeneous arrays
ANSWER: C
1.16Which of the following is a tool, used for years by software engineers, that is a central
repository of information about the data items appearing throughout a software system?
ANSWER: B
1.17What is the name of the software development model used to develop prototypes that has
recently become popular with software engineers and challenges the waterfall model?
ANSWER: B
1.18Whichone of the following refers to testing that insures that each instruction in the
software is executed at least once?
ANSWER: A
1.19What is the name of the software development model where a team of less than a dozen
programmers work closely together and freely share ideas and assist each other during the
development process?
ANSWER: A
1.20Which of the following items is not included in Unified modeling Language (UML)?
ANSWER: B
1.21What kinds of pointers are used to characterize a terminal node in a binary tree?
4
ANSWER: C
1.22Let X be the address of the memory cell containing the entry in the first row and first
column of a static array stored using row major order. If we let C represent the number of
columns in the array (which is the number of entries in each row), the address of the entry
in the i th row and j th column will be?
A. x+(c*j+1)+(i+1)
B. x+(c-1)+(j*(i-1))
C. x+(c*(i-1))+(j-1)
D. x+(i*(c-j)+1)
ANSWER: C
1.23If thenodes of a binary tree are stored in a single contiguous block of memory cells, which
number should be used to divide the node's position in the block if we want to find the
location of a node's parent?
A: 2 B: 3 C: 4 D: 5
ANSWER.(A)
1.24What is the name of the action of adding an element to the top of a stack?
A. Pushing an entry
B. Popping an entry
C. Removing an entry
ANSWER: A
1.25What is the term used to describe the phenomenon in which memory space slowly
disappears when garbage collection fails to reclaim storage space?
Answer: A
5
Section 2. Fill-in-the-blank/Short-answer Questions (There are 25 questions
in this section each worth 2 points apiece.)
Answer these questions with words, numbers and/or sentences.
Chapters 1 - 5
2.1 How many bits would be in the memory of a computer with 1 Kilobyte of main memory?
2.2 What is the largest numeric value that could be represented with three bytes if each digit
were encoded using one ASCII pattern per byte? What if binary notation were used? (Just
give an expression for the numeric value; you do not need to calculate the actual value.)
ANSWER: With ASCII, the largest numeric value is 999. With binary notation, the largest
value is 2**24 = 16,777,215.
2.3 Can AND-operations be performed directly on memory cells? Explain your answer!
ANSWER: No. The only operations that can be performed on memory cells are LOAD (from
memory cell to register) and STORE (from register to memory cell). Data must reside in a
register before it can be manipulated by a binary operation such as AND.
2.4 What are the three operations performed during each machine cycle?
B. How many processes can obtain a time slice in one second if they all use only half
of their slice?
ANSWER: Multitasking means that a number of tasks are run at the same time. Time-sharing
allows tasks to share a single CPU by giving each task a time-slice.
ANSWER: The Internet Protocol is the only network layer protocol in the TCP/IP protocol
suite. An IP packet contains an IP-header plus a payload which may, for example, be a TCP
segment. The current version is 4 but IPv6 is available and waiting for the day when all the
IPv4 addresses are in use. The IP-header contains the source and destination addresses of the
packet as well as a time-to-live value.
6
ANSWER: The main purpose of a name server is to translate a domain name into an
IP-address.
2.9 What sequence of values will be printed when the following instructions are executed?
X ← 7;
while (X < 8) do
(print the value of X;
X ← X + 1)
print the value of X;
while (X > 2) do
(print the value of X;
X ← X - 2)
ANSWER: 7, 8, 8, 6, 4
ANSWER: A programmer can move back and forth between the editor and debugging tools
with ease, as changes to the program are made and tested.
ANSWER: A function is a procedure that returns a value associated with the function
name.
ANSWER: Because the program must be rewritten to conform to the new computer’s
register configuration and instruction set.
ANSWER: One class can inherit the properties of another class by using inheritance. This
means that all of the data and methods from the parent class are inherited by the child class.
7
The child class usually adds some of it's own data and methods, making it different from the
parent class.
ANSWER: The idea is to produce a program that can be easily understood by a programmer
and can be shown to meet its specifications.
2.17What is the difference between the traditional waterfall model of software development and
the newer prototyping paradigm?
2.18What are the four major stages within the development phase of the software life cycle?
ANSWER: If a software designer studies the movement of data through a system, the points at
which data formats are altered or where data paths merge and split can be identified. These are
the points at which processing occurs and where procedures must be defined.
ANSWER: G
/\
8
E I
/\ /\
C F H J
/\ \
B D K
2.22Explain why a modern programming language such as Java does not include pointers as a
printive data type.
ANSWER: Pointers are easily misused by programmers and can cause problems when
debugging and testing programs.
2.23Name the pointers used to manage a stack stored as a contiguous block of memory cells
and then explain how these pointers are used when a new entry is pushed onto the stack.
ANSWER: There are two pointers used, one that contains the memory address of the base (or
bottom) of the stack and another that has the address of the top (usually called the stack
pointer). To push an entry, we adjust the stack pointer to the vacancy just beyond the top of
the stack.Then place the new entry at this location.
ANSWER:
A list is a collection of entries that are arranged sequentially. Beginning of list is called the head
and end of the list is called the tail.
A stack is a list in which entries are removed and inserted only at the head.
A queue is a list in which entries are removed only at the head and new entries are inserted
only at the tail.
ANSWER: The advantage is that it has the ability to expand while effectively using available
memory space which is essential when creating dynamic lists. The disadvantage is that each
stored element requires room for the element value and a pointer (or address).
9
Section 3. Vocabulary (Matching) Questions (There are 25 questions in this
section each worth 1 point apiece.)
Answer these questions with the one letter of the word in the list that best
matches the description.
Chapters 1 - 3
3.1 193.10.1.1
3.2 A segment of a track in a mass storage system.
3.3 The part of a machine instruction that is not the op-code.
3.4 An apparatus (usually on a printed circuit board) that handles communication between a
computer and other devices.
3.5 Can store the value of a single bit.
Chapters 4 - 5
10
3.11To simplify the description of objects with similar yet different characteristics, object-
oriented languages allow one class to encompass the properties of another through a
technique known as _______ .
3.12The programming paradigm called imperative is also referred to as the ______ paradigm.
3.13 This is one of the three activities involved in translating a program from one language to
another.
3.14What is the name in the object-oriented paradigm for a template used to create identical
objects?
3.15 This can be interpreted by a virtual machine that has been installed in a web browser.
A. XP B. specifications C. design
pattern
D. dataflow E. waterfall F. CRC
diagram
G. CASE H. entity- I. fountain
relationship
diagram
J. use case K. data dictionary L. metrics
diagram
M. class diagram N. parameters O. indicators
P. module Q. validation R. UML
ANSWER: 3.16: H, 3.17: Q, 3.18: L, 3.19: G, 3.20: E
3.21If we select any node in a tree, we find that the node together with the nodes below it
form a ______ .
3.22 A queue is also known as a _______ data structure.
11
3.23 A ______ is the most appropriate way to store and maintain a dynamic data structure.
3.24 A pointer that provides initial access to a tree data structure.
3.25 A is a convenient storage structure for implementing a static list.
12