Chapter 13


1.

What is a data structure?

a structured way of storing data, that also defines how that data willbe processed

2.

Give three examples of data structures.

stack, queue, linked list, doubly linked list

3.

What is a stack?

a data structure that stores data on a last-in, first-out basis.

4.

What is an algorithm?

a systematic way of solving a problem

5.

What is the basis of the bubble sort?

to compare two adjacent elements in an array or list and to switch them if they are not in order

6.

What two methods must be associated with a linked list?

push and pop.

7.

What is a doubly linked list?

a linked list that has references to the item before it in the list and the item after it in the list

8.

What does the word static do?

it causes a local variable s value to be retained between iterations of a function

9.

What is recursion?

it is the process whereby a function calls itself

Answers

1.

A structured way of storing data, that also defines how that data will be processed

2.

Stack, queue, linked list, doubly linked list

3.

A data structure that stores data on a last-in, first-out basis.

4.

A systematic way of solving a problem

5.

To compare two adjacent elements in an array or list and to switch them if they are not in order

6.

Push and pop.

7.

A linked list that has references to the item before it in the list and the item after it in the list

8.

It causes a local variable’s value to be retained between iterations of a function

9.

It is the process whereby a function calls itself




C++ Programming Fundamentals
C++ Programming Fundamentals (Cyberrookies)
ISBN: 1584502371
EAN: 2147483647
Year: 2005
Pages: 197
Authors: Chuck Easttom

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net