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

Aunt Harriet never meant to say any of this when Elizabeth Ann could hear, but the little girl’s ears were as sharp as little girls’ ears always are, and long b
I’ll give brainliest just please help
Solve the following inequality for x: −4x + 2(5x − 6) > −3x − 39
Find the missing angle or find X?
Identify whether each phrase is an expression, equation or inequality.
I need help with this important question it's to find the value of x° it's for a important grade pls really help me.​
1/2 of 2/2 = ???????????
\Which statment explains how cellular respiration and photosytheis are opposite processes. a Cellular respiration uses carbon dioxide to break down glucose, the
7 - 3x + 6x^2 - 10 + x - x^2=?
If the defendant fails to answer a complaint, the judge may decide to issue a _____. a. Civil settlement b. Default judgment c. Summary judgment d. None of the