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

I​ can't think of how my life could be any better. ​Wow, how could my life be any​ better!
Juan ran the lemonade stand for 3 more days. Each day, he used the money from sales to purchase more lemons, cups, and sugar to make more lemonade. On day 2, he
1274 people work at three departments of a factory. The second department employs 70 people more than the first one and the third department employs 84 more wor
math homework please help
Who elects the Speaker of the House of Representatives
solve the equation using multiplication or division-13=m -5
Why has the House of Representatives grown so much faster than the Senate? Representation is based on population, and the US has grown steadily. The number o
(x^2-4)=0 idk how to do it
Describe the opposing attitudes toward Great Britain that colonists held prior to and during the Revolutionary War. How did different social groups respond?
what is 14÷100 in standard form