Question: A function cannot return the value of an enumeration type. Question 1 options: True False Question 2 ( 9 points ) An anonymous type can

A function cannot return the value of an enumeration type.
Question 1 options:
True
False
Question 2(9 points)
An anonymous type can be passed as a parameter to a function.
Question 2 options:
True
False
Question 3(9 points)
Consider the declaration:
enum sports {BASKETBALL, FOOTBALL, HOCKEY, BASEBALL, SOCCER};
which of the following statements is true?
Question 3 options:
a)
FOOTBALL <= SOCCER
b)
BASEBALL++= SOCCER
c)
SOCCER--= BASEBALL
d)
HOCKEY + FOOTBALL < SOCCER
Question 4(9 points)
A data type wherein you directly specify values in the variable declaration with no type name is called an anonymous type.
Question 4 options:
True
False
Question 5(9 points)
No arithmetic operations are allowed on the enumeration type.
Question 5 options:
True
False
Question 6(9 points)
What is the output of the following code?
enum courses {ALGEBRA, BASIC, PASCAL, PHILOSOPHY, ANALYSIS};
courses registered;
registered = ALGEBRA;
cout << registered << endl;
Question 6 options:
a)
1
b)
0
c)
ALGEBRA
d)
"ALGEBRA"
Question 7(9 points)
Which of the following statements creates an anonymous type?
Question 7 options:
a)
enum {};
b)
enum grades {};
c)
enum {A, B, C, D, F} grades;
d)
enum grades {A, B, C, D, F};
Question 8(9 points)
Which of the following statements declares the studentGrade variable?
Question 8 options:
a)
enum studentGrade {A, B, C, D, F} grades;
b)
enum studentGrade {A, B, C, D, F};
c)
enum grades {A, B, C, D, F} studentGrade;
d)
enum int {A, B, C, D, F} studentGrade;
Question 9(9 points)
The following is a legal C++ enumeration type:
enum colorType {BLUE, GREEN, PINK, YELLOW, RED};
Question 9 options:
True
False
Question 10(9 points)
The following is a valid C++ enumeration type:
enum places {1ST,2ND,3RD,4TH};.
Question 10 options:
True
False
Question 11(9 points)
The values in the domain of an enumeration type are called ____________________.
Question 11 options:
a)
indices
b)
placeholders
c)
enumerators
d)
positions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!