Comp 121

Chapter 10 Study Guide

Chapter 10

What is a data field? Taken together, what do all of the data fields form? In C++ what is a structure?

 

To use a record, what two steps are needed?

 

What does populating the structure refer to? How is it done?

 

Is the declaration of the data type global or local?

 

Can individual members of a structure be any valid C++ data type?

 

How do you declare an array of structures? How do you refer to a particular data item?

 

How is a structure member passed to a function? Can a complete structure be passed to a function? If so, is this done using pass by reference or pass by value?

 

How can a structure be passed to a function using a pointer? What has higher precedence * or . ? For example, (*pt).payRate, versus *pt.payRate, versus *(pt.payRate), what is the difference between these?

 

What does pointer->member notation mean? What is it equivalent to?

 

What does ++pt->hours do and how is it different from (++pt)->hours?

 

What is a disadvantage to adding or deleting from arrays as opposed to linked lists?

 

What is a linked list?

 

What is the process of adding and deleting from a linked list? How are pointers used within linked lists?

 

What do the new and delete operators do?

 

What is a union? What kind of variable can a variable declared as a union data type hold?

 

What is the form of the definition of a union?