# Data Structure Exam

I. Multiple Choice: Encircle the best answer. (20 pts)

1. It is a data structure that contains an undefined number of elements a. Static array

b. Stacks

c. Dynamic array

d. Pointers

2. Given the expression 2 / 5 * 6 / ( 7 + 8 – 9 * 1 ) – 2 * 3, its postfix equivalent is: a. 2 5 / 6 * z 8 / 9 1 * – 2 3 * –

b. 2 5 / 6 * z 8 + 9 1 * – 2 3 / * –

c. 2 5 / 6 * z 8 + 9 1* – / 2 3 * –

d. 2 5 6 * / z 8+ 9 1 * – / 2 3 * –

3. Given the expression 4 6 5+ * 3 – , its infix notation is: a. 4 + ( 6 * 5 ) – 3

b. 4 * 6 + 5 – 3

c. 4 + 6 * 5 – 3

d. 4 * ( 6 + 5 ) – 3

4. Initializing a two-dimensional array is:

a. type arrayname[column][row];

b. type arrayname[x][y];

c. type arrayname[row][column];

d. type arrayname[y][x];

5. Initializing Linked lists would require the use of:

a. trees

b. linked list

c. list variable

d. pointers

6. The number of fields per node required in a doubly circular linked list is a. 1

b. 2

c. 3

d. 4

Given the linked list below, answer # 7 – 10

7. What is the address located at e?

a. 600

b. 500

c. 100

d. NULL

8. What is the address located at f?

a. 600

b. 500

c. 100

d. NULL

9. What is the address of the value BAPA?

a. 600

b. 200

c. 100

d. NULL

10. What is the address located at a?

a. 100

b. 200

c. 1000

d. NULL

II. MODIFIED TRUE OR FALSE. Write TRUE on the blank provided if the statement is true. Otherwise, write the correct word that will replace the underlined word to make the statement correct. (10 pts.)

1. The head of the queue is also known as the rear.

2. We encounter stack overflow when we attempt to remove item from an empty queue. 3. The tail of a circularly linked list contains the value of the item and NULL as the value of the pointer to the next item. 4. The opening of the stack is called top.

5. We can execute the code below even without a header file.

main( )

{

// this is...

Please join StudyMode to read the full document