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

if ratio x and y form a proportion and ratio y and z form a proportion, do ratio x and ratio x form a proportion?
1, 2ጠ+6=12 2, 5ጠ-5=10 3, |ጠ|=3
Can someone help me with this? Please.
mention five ways by which computer can be misuse or abuse
What are the goals of network security and what sorts of attacks do you need to defend against
Which processes are shown in the image above?
The scale on a blueprint of a home is 1 in : 4 ft. The actual length of the family room is 26 feet. What is the blueprint length?
Question is uploaded
Select the value that make the inequality -C > 4 true. Then write an equivalent inequality, in terms of c (numbers written in order from least to greatest g
Sweet T is making a double batch of cupcakes he puts them in the oven at 6:50 They need to bake for 25 minutes when should Sweet T take them out the oven?