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

What are the mean,mode, and range for this set of data? 5.1,3.7,3.1,4.3,7.2,4.3,2.5
Sunland Sports sells volleyball kits that it purchases from a sports equipment distributor. The following static budget based on sales of 1,940 kits was prepare
3x^2 - 6 = 2x wat is discriminant of the quadratic equation
help me please, its due at night today!!!
It x > 0 the expression (sqrt(x))(sqrt(2x)) equivalent to
10. The nickname given to the U.S. and Soviet Union for becoming the top two nations after WWII. "
Gary drew a rectangle with a perimeter of 16 inches. Then he tried to draw a square with a perimeter of 16 inches. Select the dimensions of the rectangle drawin
please graph this for me.
NEED HELP ASAP - 35 Pts. + BRAINLIEST for the best answer!!! (Please show your work) Question: You are designing a pendulum clock to have a period of 8.0 s. How
Why is there a myth that Shakespeare uses a large vocabulary?Shakespeare’s vocabulary is...