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

When I turn it n, if I see your answer was right, you get brainliest. Don’t try messing me up because I have 3 retakes lol. Which sentence best describes the pi
Explain your answer !! Have a nice day Will give braisnlt
( Please help me on this question! ) ( I failed my last unit test, that's why I really need this answer. ) ( Thank you, <3 ) ..............................
bernard mandeville importance in literature
What two things should Zara keep in mind to make sure that the food her restaurant serves is free of chemical contaminants?
Brianna answered the question on the test about exponent rules with the answer you see to the right of the equal sign, but she got it wrong. Why? What were her
At a conference, there are 121 math teachers and 33 science teachers. Write the ratio of math teachers to science teachers in simplest form.
Help! 50 points and get brainleist
information that helps prove whether an argument about history is true is
calculate the length of ac to 1 decimal place