Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

Students also viewed these Databases questions

Question

Who decides the content of a contract and on what basis?

Answered: 1 week ago

Question

Learn about HRM development in Poland in recent years.

Answered: 1 week ago