Enter your search terms
Submit search form
Web
examineonline.googlepages.com
Online Exam
>>
DataBase
>>
Data Structures
>>
Test 2
Menu
Programming
COMPTIA
GMAT
English
IQ
DataBase
OS
MCSE
CISCO
Finance
Management
Health
Soft Skills
Web Building
Multimedia
Test 2
1 . _____________ Memory is Volatile
A.
Cache
B.
Random Access
C.
Virtual
D.
Main
2 . A register is a small amount of memory within the CPU that is used to temporarily store instructions and data.
A.
True
B.
False
3 . An _________ data type is a keyword of a programming language that specifies the amount of memory needed to store data and the kind of data that will be stored in that memory location
A.
real
B.
abstract
C.
number
D.
string
E.
final
4 . Which are the different Abstract Data Type Groups?
A.
Integer
B.
Floating-Type
C.
Character
D.
String
E.
Boolean
5 . Which of the following abstract data types are NOT used by Integer Abstract Data type group?
A.
Short
B.
Int
C.
float
D.
long
6 . The byte abstract data type is the smallest abstract data type in the integer group and is declared by using the keyword byte
A.
True
B.
False
7 . Signed numbers donot have any impact on the memory
A.
True
B.
False
8 . Memory is reserved by using a data type in a declaration statement.
A.
True
B.
False
9 . How many parts are there in a declaration statement?
A.
1
B.
2
C.
3
D.
4
10 . The size of a structure is determines by the Product of sizes of all primitive data types within the structure
A.
True
B.
False
11 . Why would you use a structure?
A.
You use a structure to access parts of a data
B.
You use a structure to declare an instance of data group
C.
You use a structure to group together related data.
12 . A Pointer is a Variable
A.
True
B.
False
13 . Pointer to a pointer is used in a program to
A.
arrange data by moving data in memory
B.
arrange data by moving pointer in memory
C.
arrange data without having to move data in memory.
D.
None of the above
14 . What does the symbol * signifies
A.
Tells the computer that you are declaring a pointer
B.
Tells the computer that you are declaring a variable
C.
Both a) and b)
D.
None of the above
15 . char *ptGrade; The use of the symbol ; ( semi colon) in the above example is wrong
A.
True
B.
False
16 . An array is a way to reference a series of memory locations using the ______
A.
Same name
B.
different name
C.
Multiple names
D.
Unique name
17 . The way to declare an array is not dependent on the programming language used to write your program.
A.
True
B.
False
18 . How do you assign an address to an element of a pointer array ?
A.
by using the address operator, which is the ampersand (&), in an assignment statement
B.
by using the address operator, which is the asterisks (*), in an assignment statement
C.
by using the address operator, which is the Double-asterisks (**), in an assignment statement
D.
None of the above
19 . Elements of an array are stored _______ in memory
A.
Periodical
B.
Sequentially
C.
Parallely
D.
None of the above
20 . Allocating memory at runtime is also called as
A.
Statically allocating memory
B.
Dynamically allocating memory
C.
Sequentially allocating memory
D.
All of the above
21 . _________ is the way you groups things together by placing one thing on top of another and then removing things one at a time from the top
A.
Array
B.
Stack
C.
Pointer
D.
All of the above
22 . _________ method places a value onto the top of a stack.
A.
push() member method
B.
pop() member method
C.
isFull() member method
D.
isEmpty() member method
23 . Popping removes an item from the stack
A.
True
B.
False
24 . __________ method removes the value from the top of a stack
A.
push() member method
B.
pop() member method
C.
isFull() member method
D.
isEmpty() member method
25 . The isEmpty() member method determines if there is room for one more value on the stack.
A.
True
B.
False
26 . What kind of value is assigned to the top attribute?
A.
Variable
B.
Index
C.
Character
D.
Float
27 . The keyword ___________ means that the attribute or member method is accessible only by a member method.
A.
Private
B.
Public
C.
Both a) and b)
D.
Neither a) nor b)
28 . Constructor is a member method of a class that is called when an instance of the class is declared
A.
True
B.
False
29 . A Queue is a sequential organization of data.
A.
True
B.
False
30 . Data in a queue is accessible
A.
First in First out
B.
First in last out
C.
Last in First out
31 . Priority queue organizes items in a line where the first item is at the beginning of the line and the last item is at the back of the line.
A.
True
B.
False
32 . Items on a priority queue can jump to the front of the line if they have priority.
A.
True
B.
False
33 . Data stored in a queue is actually stored in an array. The queue tracks which array element is at the front of the queue and which array element is at the back of the queue.
A.
True
B.
False
34 . The _______ process places data at the back of the queue
A.
enqueue
B.
dequeue
C.
priority queue
35 . The dequeue process removes data from the front of the queue
A.
True
B.
False
36 . The isFull() member method is called within the enqueue process to determine
A.
if there is room to place another item in the queue.
B.
if there is an item in the queue to be removed
C.
if there is an item in the queue to be locked
37 . The ~Queue() member function is the Constructor
A.
True
B.
False
38 . Each entry in a linked list is called a _______
A.
Link
B.
Node
C.
Data structure
39 . A linked list is a data structure consisting of elements called nodes. Each node points to the next and the previous node, thereby linking nodes together to form a linked list.
A.
True
B.
False
40 . A Node has ___ elements
A.
None
B.
One
C.
Two
D.
Three
41 . Link list does not have any advantage when compared to an Array
A.
True
B.
False
42 . A Linked list can grow and shrink in size dynamically at _______
A.
Beginning
B.
Run time
C.
Ending
D.
None of the above
43 . A node can reference more than one data element
A.
True
B.
False
44 . What member function places a new node at the end of the linked list?
A.
appendNode()
B.
addNode()
C.
displayNode()
D.
structNode()
45 . displayNodes() method displays the linked list in natural order
A.
True
B.
False
46 . The last member function is _____________
A.
appendNode()
B.
destroyList()
C.
displayNode()
D.
structNode()
47 . The LinkedList class specification is defined in the source file
A.
True
B.
False
48 . The LinkedList constructor is a member function that is called when an instance of the LinkedList is removed
A.
True
B.
False
49 . Look at the following example LinkedList() { front = NULL; back = NULL; } In this example, Both the front and back pointers are assigned a NULL value
A.
True
B.
False
50 . The destroyList() member function deletes the contents of the linked list and ________________
A.
does not delete the linked list itself
B.
delete the linked list itself
C.
adds the linked list itself
D.
None of the above
Test Name :
Test 2
Category :
Data Structures
Number of Question :
50
Pass Score :
80
Test Result
Your Score :
Passing Score :
80
Result :
Copyright by
VanTuMinh
© 2007