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

• Machine s is cleaned every 12 weeks. •Machine that is cleaned every 8 weeks. What is the fewest number of weeks that will pass before both machines are cleane
A rectangle has a side lenghts of 5 centimeters and 3 centimeters. If the side lenghts are doubled, will the area also double?
1 pair of opposite sides that are parallel
5 people share 3 bags of trail mix which fraction would each get?
Why did the United States encourage Panama’s declaration of independence from Colombia?
what is the difference between DNA and RNA ?
Actions that are reactions to a stimulus are called _____________________.
There is a pyramid which is 5.95cm and a base of 5.1 what is the surface area?
Lincoln promised the South that he would not interfere with slavery where it already existed. a. True b. False
Who got the first Oscar award ever?