Exam 11: Structured Data

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

It is possible for a structure to contain as a member a pointer to its own structure type.

(True/False)
4.8/5
(34)

The expression s->m; indicates that s is a structure pointer and m is a structure member.

(True/False)
4.9/5
(33)

When a programmer creates an abstract data type, he or she can decide what values are acceptable for the data type, as well as what operations may be performed on the data type.

(True/False)
4.8/5
(50)

Look at the following structure declaration. struct Circle { \quad double centerX; \quad double centerY; \quad double radius; }; Assume that circle1 and circle2 are variables of the Circle type, and their members have been initialized. Is it true or false that the following if statement correctly determines whether the two variables' members contain the same data: if (circle1 == circle2)

(True/False)
4.8/5
(34)

If a function is legally prototyped to return an integer value, it can return a structure member that is an integer data type.

(True/False)
4.8/5
(36)

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

(Multiple Choice)
4.9/5
(41)

A structure _____________ contain members of the same data type.

(Multiple Choice)
4.7/5
(46)

You cannot directly assign an integer value to an enum variable.

(True/False)
4.8/5
(43)

This allows you to access structure members.

(Multiple Choice)
4.9/5
(35)

You may use a pointer to a structure as a

(Multiple Choice)
4.7/5
(42)

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

(Multiple Choice)
5.0/5
(37)

The expression *s->p; indicates that s is a structure pointer and p, which is also a pointer, is a member of the structure pointed to by s.

(True/False)
4.8/5
(46)

Look at the following declaration. enum Tree { OAK, MAPLE, PINE }; In memory, what value will the MAPLE enumerator be stored as?

(Multiple Choice)
4.8/5
(36)

You can define any number of union variables, but each variable can only store the value of one member at a time.

(True/False)
4.9/5
(40)

To dereference a structure pointer, the appropriate operator is:

(Multiple Choice)
4.8/5
(42)

A union can only have one member.

(True/False)
4.8/5
(39)

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

(Multiple Choice)
4.9/5
(39)

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

(Multiple Choice)
4.8/5
(49)

If Circle is a structure tag, the statement Circle doSomething(Circle c2) Can be the header line for a function that

(Multiple Choice)
4.7/5
(40)

It is possible to output the contents of all members of a structure variable using a cout << statement followed by the name of the structure variable.

(True/False)
5.0/5
(27)
Showing 21 - 40 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)