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 is the capital of the states whose neighbors include minnesota , iowa, and michigan?
What is 20/6 in an simplified form?
I need help factoring!
Why did Mao Zedung get involved in the Korea War?
Which is one reason that American colonists in new England lived and worked differently from American colonists in the south A. The contrast in the geography of
what multiplies to get -80 but adds to get 2
how do you work out linear equation word problems
Why is it often easier to start a fitness program than it is to maintain one?
in a class of 28 sixth graders all but one of the students are 12 years old. witch two data measurements are the same for the students ages/ what are those meas
Which of the following describes Tammany Hall?