elishane9683 elishane9683
  • 19-07-2019
  • Computers and Technology
contestada

What is the value of this expression?
(int)blue
refer to data type color_t
typedef enum
{
red, orange, yellow,green, blue
}
color_t;
A. 0
B. 1
C. 4
D. 5

Respuesta :

Branta Branta
  • 01-08-2019

Answer:

C. 4

Explanation:

typedef enum{

       red,orange,yellow,green,blue

}

color_t;

defines an enumeration type color_t with the values red,orange,yellow,green,blue.

If we print out the values of these individual elements they will be as follows:

red : 0

orange : 1

yellow: 2

green: 3

blue: 4

Note that the integer values are dependent on the position in the definition.

Answer Link

Otras preguntas

which can be used to describe an equivalent expression for (3^6)^-3
What kind of bonds form between the oxygen atoms of one water molecule and the hydrogen atoms of another water molecule
How long does it take to bleed out after you bite off your tongue?
Air pollution in US national parks is affecting the environment in what way
The National Response Framework: a. Is based on the premise that governments have sole responsibility for responding to major emergencies. b. Mandates that the
Group insurance plans have been required to cover mental health treatment since:
11. A patient treated for a severe allergy-associated airway obstruction can use ______ as an emergency drug. A. Cipro B. Keflex C. epinephrine
Chantal notices that her audience is starting to fidget and a few have started putting away their materials. chantal needs to make one more crucial point before
How to solve this problem
country that sends the most imports to Canada