Programming Chapter 9
The syntax for accessing a struct member is structVariableName ___________.
.memberName
Which of the following is an allowable aggregate operation on a struct?
Assignment
Memory is allocated for struct variables only when you ___________ them.
Declare
A struct variable can be passed as a parameter ____.
Either by value or by reference
A function can return a value of the type array.
False
The components of a struct are called the _______ of the struct.
Members
A function can return a value of the type struct.
True
Data in a struct variable must be read one member at a time.
True
To access a structure member (component), you use the struct variable name together name together with the member name; these names are separated by a dot (period).
True
You can use an assignment statement to copy the contents of one struct into another struct of the same type.
True
struct rectangleData { double length; double width; double area; double perimeter; }; rectangleData bigRect;
cin>>bigRect.length;
The statement that declares intList to be a struct variable of type listType is _____________.
listType intList;
To compare struct variables, you compare them ___________.
member-wise
Which of the following struct definitions is correct in C++?
struct studentType { int ID; };