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

How was the roman empire latinized? how did the roman culture and political spred?
Rebecca, a department manager, has been dealing with two workers in her department who do not get along. due to family problems for both employees, today they h
How do yo know when you need to regroup
A family had five members- a mom, a dad, two sisters and a brother.! The family lines up single file. What is the probability that the mom is at the front of th
what characteristics make Ur an advanced city?
Laissez-faire __________ means an economic system with little government regulation or interference.
Need help with problem 20 and 22.
Jane has a 12 oz milkshake 4oz in the milkshake are vanilla and the rest is chocolate what are the two equivalent fractions that represent the fraction of the m
What is the value of m2 - 2mn + n2 for m = -2 and n = 4? -36 -4 4 36
Put in order from least to greatest 1.1..., 1 1/10, 1.01