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 causes air-borne environmental pollutants
Is the square root of 40 a rational number or an irrational number?
What was not a reason why the Federalist papers were written? Question 5 options: To influence people to vote for ratification of the Constitution To explain
physical and mental changes in human beings occur (points : 1) primarily during infancy. primarily during infancy and early childhood. primarily during infancy,
The graph shows the temperature of a liquid that is being heated during an experiment. Three of the statements are true. Which is NOT?
There were some people on a train. 19 got off the train at the first stop. 17 people get on the train. How many people were on the train to begin with?
factor out completely: 4a^2c^2-(a^2-b^2 c^2)^2
0.425 as a fraction in simplest form
which chromosome is in part responsible for determining maleness? a. x chromosome b. y chromosome c. autosome d. chromosome 21
what is is 0.000431 as an integer?