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

Relationship between culture and communication design
HELPP PLEASE!!!!!!!!!!!!!!!!!!!!!!
please help me write quadratic equation given the roots and the leading coefficient
passes through (-2, 1) and (2, -5) I need to find the y=mx+b
- 13/14 divided -26/4 im soo confujsed with this lesson btw this is for math review just so u know
What property of an object determines how much inertia it has.
who was the president of the united states i n 1973
i will give brainliest !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You draw a rectangular picture that is 8.5 inches wide. It is 3 times as long as it is wide. What is the area of the picture?
If you throw exactly one head in three tosses of a coin you win $28. if not, you pay me $12. Step 2 of 2: If you played this game 756 times how much would you e