Problem

Mark the following statements as true or false. a. The following is a valid C++ enumera...

Mark the following statements as true or false.

a. The following is a valid C++ enumeration type:

enum romanNumerals {I, V, X, L, C, D, M};

b. Given the declaration:

enum cars {FORD, GM, TOYOTA, HONDA};

cars domesticCars = FORD;

the statement:

domesticCars = domesticCars + 1;

sets the value of domesticCars to GM.

c. A function can return a value of an enumeration type.

d. You can input the value of an enumeration type directly from a standard input device.

e. The only arithmetic operations allowed on the enumeration type are increment and decrement.

f. The values in the domain of an enumeration type are called enumerators.

g. The following are legal C++ statements in the same block of a C++ program:

enum mathStudent {BILL, JOHN, LISA, RON, CINDY, SHELLY};

enum historyStudent {AMANDA, BOB, JACK, TOM, SUSAN};

h. The following statement creates an anonymous type: enum {A, B, C, D, F} studentGrade;

i. You can use the namespace mechanism with header files with the extension h.

j. Suppose str = "ABCD";. After the statement str[1] = 'a';, the value of str is "aBCD".

k. Suppose str = "abcd". After the statement:

str = str + "ABCD";

the value of str is "ABCD".

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 8
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT