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

solve this proportion: 1/c+5=2/3
how to find all real and imaginary zeros of f(x)=x^4+5x^2-5x^3-6+5x
Please solve number 27.) -5(3-q) +4 =5q-11
how do oceanographers get to the bottom of the ocean?
factor completely if the polynomial is not factorable write prime also state the methods used to factor the polynomial. 1. x^2-12x+36 2. r^3-81r 3. 35x^3y
What problems brought on the tariff debates of 1827 and 1828? In what way did the South respond to northeastern demands for a higher tariff, and on what did the
what is 6/7 - 2/5 please help
what is 3/5 plus 5/8?
what is 3/5 plus 5/8?
In the Sumerian civilization, the purpose of a ziggurat was to