Professional Documents
Culture Documents
MODULE Informatics 1B
DURATION 3 hours
m
Answer ALL questions.
Choose the most appropriate answer. Write down numbers 1.1 to 1.20 in your answer book and next to each number
write the letter that represents the correct answer. E.g. 1.21 A
A. Arrays
B. Linked lists
C. Databases
D. Queues
A. int[10] arr;
B int arr[10];
C. int arr = new int[10];
D. int[] arr = new int[10];
1.4 The process of separating the logical properties of the data from its implementation is called:
A. Methods
B. Statistics
C. Data abstraction
D. Stacking data
1.5 A data item that can only be used within a method is called:
A. A local variable
B. An instance variable
C. A global variable
D. A private variable
1.6 A constructor:
1.8 A ________ is a collection of data items where each item is linked to its successor.
A. Linked list
B. Element link
C. Constant references
D. Node contents
A. It is effective
B. It is fast
C. It is external
D. It is extensive
A. Databases
B. Sequential files
C. Direct files
D. Arrays
1.11 Data structures that are created and used from within your program are referred to as:
2
m
1.12 Which of the following statements are valid array declarations?
A. (i)
B. (ii) & (iii)
C. (i) & (iii)
D. (iv)
1.13 The relationship between two classes that is based on the aggregation relationship:
A. Composition
B. Encapsulation
C. Information hiding
D. Notation
1.14 A method is called, and before it completes, that method calls a second one, the second calls a third before
completing and so forth, this is referred to as:
A. Stacking
B. Method chaining
C. Queues
D. Popping
A. The program has a compile error because the size of the array wasn't specified when declaring the array.
B. The program has a runtime error because the array elements are not initialized.
C. The program runs fine and displays x[0] is 0.
D. The program has a runtime error because the array element x[0] is not defined.
3
m
1.16 What is the result of compiling and running the following code?
A. objects
B. object references
C. primitive data type
D. None of the above
A. method
B. object
C. variable
D. queue
4
m
QUESTION 2 (20 Marks)
State whether the following statements are True or False. Write down the question number and the word True or False
next to it. E.g. 2.21 True
5
m
QUESTION 4 (20 Marks)
END OF PAPER
6
m