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

refers to every other sentence in a paragraph contributing to the topic sentence.
Is triangle A'B'C' a dilation of triangle ABC? Explain. Yes, it is an enlargement with a scale factor of 3. Yes, it is an enlargement with a scale factor of Eig
What happened in the United States after the Japanese attack on Pearl Harbor?
What is the process for adding a text box on a slide?
Sebastian wants to create a right triangle with side lengths 14 inches, 48 inches, and 5 inches. Is this possible? Why or why not? Yes, because 14? + 48is equal
please awnser quickly
What made it difficult for freed Americans to take advantage of the homestead act?
ASAP: which statement best explains the role of this sentence within the overall structure of this passage. from building bridges and answer the 2nd part as wel
How would you compare and contrast Pecos Bill and Perseus as heroes?
What is the slope of the line