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

Please help with these questions for spansih
The phrase "harmony is vertical" means that
which of these is a base A) vinegar B) ammonia C)HCL D)HNO3
Identify the value of x that makes each pair of ratios equivalent. 2:x and 12:18
ABDC is an isosceles trapezoid. Given only the choices below, which properties would you use to prove ACD ≅ BDC by SSS?
Read the passage: Installing geothermal heat pumps, solar systems, and wind turbines can save energy, cut utility bills, and sometimes earn homeowners money. Ba
Which of the following contributed to the fall of the Ghana empire ?
solve and graph the following; 8.3 < -0.5b -2.7
A 24 kg child descends a 5.0 m high slide and reaches the ground with a speed of 2.8 m/s. What is the mass of the child?
Riddle #1Every night I am told what to do. Every morning I do what I'm told. But I still don't escape your scold. What am I?