Filters
Question type

Study Flashcards

Passing a structure as a constant reference parameter to a function ________.


A) can potentially result in changes to the structure's members
B) guarantees not to result in changes to the structure's members
C) will always change the structure's members
D) All of these
E) None of these

F) A) and D)
G) A) and B)

Correct Answer

verifed

verified

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


A) strings
B) integers
C) characters
D) doubles

E) A) and D)
F) None of the above

Correct Answer

verifed

verified

B

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.

A) True
B) False

Correct Answer

verifed

verified

The name of the structure is referred to as its ________.


A) data type
B) argument
C) parameter
D) tag
E) None of these

F) All of the above
G) A) and B)

Correct Answer

verifed

verified

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


A) empty
B) declared static
C) explicitly declared "global"
D) initialized and used outside any function
E) None of these

F) A) and B)
G) B) and E)

Correct Answer

verifed

verified

A good reason to pass a structure as a constant reference is ________.


A) to prevent changes to the structure members
B) to ensure changes to the structure members
C) to slow down the function's execution, preventing errors
D) to speed up the function's modification of the structure members
E) None of these

F) None of the above
G) All of the above

Correct Answer

verifed

verified

Look at the following statement. Look at the following statement.   This statement ________. A) is illegal in C++ B) will change the publisher's name of the second book in bookList to 't' C) will store the character 't' in the fourth element of the publisher member of booklist[2] D) will ultimately result in a runtime error E) None of these This statement ________.


A) is illegal in C++
B) will change the publisher's name of the second book in bookList to 't'
C) will store the character 't' in the fourth element of the publisher member of booklist[2]
D) will ultimately result in a runtime error
E) None of these

F) A) and B)
G) B) and D)

Correct Answer

verifed

verified

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


A) unsigned short int
B) long double
C) unsigned char
D) All of these
E) None of these

F) D) and E)
G) A) and E)

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

The structure pointer operator is used to dereference a pointer to a structure, not a pointer that is a member of a structure.

A) True
B) False

Correct Answer

verifed

verified

True

This describes only the general characteristics of an object.


A) initialization
B) abstraction
C) detailed specification
D) initiation
E) None of these

F) B) and E)
G) A) and B)

Correct Answer

verifed

verified

An anonymous union declaration actually creates the member variables in memory.

A) True
B) False

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

True

If a is a structure variable and p, a pointer, is a member of the structure, what will the following statement do? If a is a structure variable and p, a pointer, is a member of the structure, what will the following statement do?   A) Output the dereferenced value pointed to by p. B) Result in a compiler error. C) Output the address stored in p. D) Output the value stored in a. E) None of these


A) Output the dereferenced value pointed to by p.
B) Result in a compiler error.
C) Output the address stored in p.
D) Output the value stored in a.
E) None of these

F) B) and E)
G) A) and C)

Correct Answer

verifed

verified

To dereference a structure pointer, the appropriate operator is ________.


A) the ampersand, &
B) an asterisk, *
C) the structure pointer operator, ->
D) the dereference operator, <-
E) None of these

F) C) and E)
G) A) and B)

Correct Answer

verifed

verified

If Circle is a structure tag, the statement: Circle dosomething (circle c2) Can be the header line for a function that ________.


A) determines and returns the area of a circle
B) takes a Circle structure as a parameter, does something, and returns a Circle structure
C) operates on a constant reference to a Circle structure
D) takes two Circle parameters and does something
E) None of these

F) B) and C)
G) A) and E)

Correct Answer

verifed

verified

You may use a pointer to a structure as a ________.


A) function parameter
B) structure member
C) function return type
D) All of these
E) None of these

F) B) and E)
G) None of the above

Correct Answer

verifed

verified

Data types that are created by the programmer are known as ________.


A) variables
B) abstract data types (ADT)
C) functions
D) parameters
E) None of these

F) A) and E)
G) A) and D)

Correct Answer

verifed

verified

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


A) anonymous
B) dereferenced
C) organized
D) declared
E) None of these

F) A) and B)
G) B) and E)

Correct Answer

verifed

verified

Showing 1 - 20 of 53

Related Exams

Show Answer