lucycbrumby9908 lucycbrumby9908
  • 04-04-2020
  • Computers and Technology
contestada

Write a statement that declares a variable of the enumerated data type below. enum Flower { ROSE, DAISY, PETUNIA } The variable should be named flora. Initialize the variable with the ROSE constant.

Respuesta :

sodiqlekan8
sodiqlekan8 sodiqlekan8
  • 06-04-2020

Answer:

enum Flower { ROSE, DAISY, PETUNIA }

Flower flora = Flower.ROSE

Explanation:

Flower is of Enumeration data type and it contains the constants ROSE, DAISY and PENTUA.

To write a statement that declares a variable of that type you use

Var_of_enum_type Var_name

And to initialize it with a constant of the enumeration data type you use the dot (.) operator.

Var_of_enum_type.CONSTANT

Answer Link

Otras preguntas

Which of the following best describes the overall mood in Frost's poem? gloomy, sunny, cheerful
CAN SOMEONE PLEASE HELP ME!!! I have been stuck on this for 2 days "All this is related by Americo, who adds that they returned to Spain and arrived at Cadiz wi
When two or more nations engage in free trade how is the standard living improved in the participating countries
A scientific _______ must be testable and capable of being proven false.
The __________ strategy is unique to anthropology.
Two numbers have a difference of 0.85 and a sum of 1. What are the numbers?
why were someone people unhappy with government restrictions like DORA?
What is the primary source of fuel for the brain? a. proteins b. fats c. carbohydrates d. vitamins?
4) will mark BRAINLIEST + 10 POINTS! :)
Two fair (6-sided) dice are rolled. what is the conditional probability that at least one lands on 6 given that the dice land on di erent numbers?