CH 11 - C++

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Which of the following statements outputs the value of the gpa member of element 1 of the student array?

cout<<student[1].gpa;

This allows you to access structure members.

dot operator

Which of the following assigns a value to the hourlyWage member of employee[2]?

employee[2].hourlyWage = 100.00;

You may use a pointer to a structure as a

function parameter. structure member. function return type. All of these

This is required after the closing brace of the structure declaration.

semicolon

If a is a structure variable and p, a pointer, is a member of the structure, what will the following statement do? cout << *a.p;

Output the dereferenced value pointed to by p

A structure pointer contains:

The address of a structure variable

Data types that are created by the programmer are known as:

abstract data types (ADT)

This describes only the general characteristics of an object

abstraction

Members of a(n) ________ union have names, but the union itself has no name.

anonymous

When a structure is passed _________to a function, its members are not copied.

by reference

A structure _____________ contain members of the same data type

can

Before a structure can be used, it must be

declared

If an anonymous union is declared globally (outside all functions), it must be:

declared static

If Circle is a structure tag, the statement Circle *pcirc;

declares a structure pointer called pcirc

Passing a structure as a constant reference parameter to a function:

guarantees not to result in changes to the structure's members

With an enumerated data type, the enumerators are stored in memory as

integers

A function ___________ return a structure

may

The name of the structure is referred to as its

tag

If Circle is a structure tag, the statement can be the header line for a function that ____.

takes a Circle structure as a parameter, does something, and returns a Circle structure

To dereference a structure pointer, the appropriate operator is:

the structure pointer operator, ->

A good reason to pass a structure as a constant reference is:

to prevent changes to the structure members

This is like a structure, except all members occupy the same memory area

union

Which of the following is an example of a C++ primitive data type?

unsigned short int long double unsigned char All of these

Look at the following statement. The statement ______. bookList[2].publisher[3] = 't';

will store the character 't' in the fourth element of the publisher member of booklist[2].


संबंधित स्टडी सेट्स

Final C++ - Chapter 15: Standard Library Containers and Iterators

View Set

MOD 1, 2 & 3 combined!!! (combined with quiz 1-3)

View Set

Mastery Level Quiz Chapter 19: Degenerative Changes in Aging prep u

View Set

Chapter 12: Patterns of Inheritance

View Set

Vancomycin-resistant Staphylococcus Aureus (VRSA)

View Set

Business analytics ch 1, 2, 4, 8, 10

View Set