Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

15. The pointer in a node points to Select one: a. the data part of a node. b. t

ID: 3685257 • Letter: 1

Question

15.

The pointer in a node points to

Select one:

a. the data part of a node.

b. the count part of a node.

c. the pointer part of the node.

d. the whole node.

16.

Removing data from a stack is called popping the stack.

Select one:

True

False

17.

*head.item is the same as (*head).item.

Select one:

True

False

18.

If you push the following numbers onto an integer stack, what item is on the top of the stack? (1,4,8,16)

Select one:

a. 1

b. 4

c. 8

d. 16

19.

To remove an item from the stack, we call the ________ function.

Select one:

a. pop

b. top

c. push

d. empty

20.

Placing data on a stack is called popping the stack.

Select one:

True

False

21.

To add an item to a stack, we call the ________ function.

Select one:

a. pop

b. top

c. push

d. empty

22.

A stack is a first-in-first-out data structure.

Select one:

True

False

23.

If you need to insert an element in the front of a list with N nodes (and move the other elements back one place), how many nodes do you have to move?

Select one:

a. 0

b. 1

c. N-1

d. N

24.

A stack exhibits ________ behavior.

Select one:

a. last-in/ first-out

b. last-in/last-out

c. first-in/first-out

d. None of these

25.

There is no need for error checking when pushing a stack.

Select one:

True

False

26.

When would you use a linked list over an array or a dynamic array?

Select one:

a. when you know the maximum size at compile time

b. when you know the maximum size at run-time

c. when you do not know the maximum size

d. when you need to access any item quickly

27.

If you write a linked list class, then you should implement the destructor, copy constructor, and the assignment operator.

Select one:

True

False

Explanation / Answer

15. a

16. True

17. False

18. d As Stack is LIFO data structure.

19. a

20. False

21. c

22. False . Stack is LIFO.

23. d

24. a

25. False ,while adding to check you must check if the stack is full or not.

26. b

27.False

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote