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 can i solve this?
What is the chemical formula for copper(II) sulfate?
I need help with this problem thank you
Amoeboid protists use their pseudopodium for:
∫c x sin y ds, C is the line segment from (0, 1) to (3, 5)
Explain the 2 different answers you can get when solving an equation and the variable is dropped out
Medical question!! I'm writing a story and I want to know what would happen in this scenario. An animal trainer gets scratched in the arm by a lion and it rips
Veronique et toi ____ quel age? -avons -ont -as -avez
How many sundaes are possible using one flavor of ice cream and three different toppings?
Consensus allows group members to agree to disagree and come to a decision with a majority vote. true or false.