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

Capillaries and veins have the same function. * O True O False​
4. When writing fiction, the setting can have a huge impact on the story. Choose a novel or story where the setting was vital to the storyline. Explain how and
What is the charge of an electron?
Please match the following subject pronouns to its correct verb ending. Group of answer choices Tu: a) A b) AS c)AN d) O Ustedes a) A b) AS c)AN d) O Ell
Under the Articles of Confederation, the ___________ had more power than the national government.
what is the answer its for a grade
please someone do this ill gove u brainliest answer
What other targets did Japan attack in addition to Pearl Harbor?
Read the summary paragraph for the article on service and answer the question that follows: Service improves society, impacting the helpers as well as those ne
please help!! I need this asap!