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

A tractor costs $12,250 and depreciates in value by 6% per year. How much will the tractor be worth in 6 years?
what expression gives the area​
How do i show my work on dividing oranges into eighths . He has 5 oranges.How many eights will he have
The amount of matter something has is _____. A. weight B. length c. C. mass D. volume
T/F A predicate noun renames the verb.
Witch statement is true about a body moving at a constant speed in a circle
An item is priced at $13.24. If the sales tax is 5%, what does the item cost including sales tax? A- $0.66 B-$13.90 C-$18.86 D-$27.14
what logo is this???????
Jody has 6 boxes of 9 buttons. So, Jody has 54 buttons in all. She divided the buttons into 7 bags. Jody put the same number of buttons in each bag. So, the
What is the quadratic in vertex form that has a vertex of (-1, 5) Options in image