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

In a sale, normal prices are reduced by 20% The sale price was £220 Calculate the normal price of the saddle
A sporting goods store charges $30 for 12 cans of tennis balls and $45 for two boxes of golf balls. A coach orders 100 cans of tennis balls and 5 boxes of golf
What tradition did the Bantu people bring with them throughout their migrations? farming hunting and gathering trading craftsmanship..
Select all that apply. What is the difference between DNA and RNA? DNA is a protein and RNA is a nucleic acid. DNA uses deoxyribose and RNA uses ribose. DNA has
Information about African American inventor solomon harper
at school, there have been a lot of rumors going around about how certain sexually transmitted diseases are spread. which skill would be most valuable to help y
Simplify the expression.4-3(2+5v)+7
Besides food, what are some other products that come from the land in the Southeast region?
What is the "host" in a typical email address?
Why were the tyrants able to seize control in Athens?