Programming Chapter 9

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

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; };


Set pelajaran terkait

Introduction to the Nervous System P1 (ANATOMY)

View Set

Workplace Readiness Skills Study

View Set

SW 241- The Social Work Interview

View Set

Udemy Java Masterclass 04: "Variables, Datatypes, and Operators" Final Coding Test

View Set

Bio 131 Regulation of Gene Expression Weeks 10/11 Lecture 2

View Set