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

How do I solve 2(a+2)=2?
convert to fraction .34
find the area of a triangle with the following dimensions: a = 12 yards b=16 yards and c=24 yards round to the nearest square yard
How do you convert 2/30 into a percent ?
How do I solve 2(a+2)=2?
How is the horizontal component of velocity for a projectile affected by the vertical component?
How many grams are in 2.4 moles of sulfur?
Anne has 24 more cards than Devi.  Anne finds that 3/5 of Devi's cards are equal to 1/2 of her cards.  How many cards does Anne have?
How do you convert 2/30 into a percent ?
Anne has 24 more cards than Devi.  Anne finds that 3/5 of Devi's cards are equal to 1/2 of her cards.  How many cards does Anne have?