Define an enum type, booktype, with the values math,csc


Write a c++ statements that do the following:

a) define an enum type, bookType, with the values MATH,CSC,ENGLISH,HISTORY,PHYSICS, and PHILOSOPHY.
b) declare a variable book of type bookType.
c) Assign MATH to the variable book.
d) Advance book to the next value in the list
e) Output the value of the variable book.

2)Given:
enum cropType {WHEAT,CORN,RYE,BARLEY,OATS}
cropType crop;

circle the correct answer.
a)static_cast(WHEAT) is 0
(i)true (ii)false
b)static_cast(static_cast(WHEAT)-1)is
WHEAT
(i)true (ii)false
c)Rye>WHEAT
(i)true (ii)false
d) for (crop=wheat; crop<=oats; ++crop)
cout<<"*";
cout<
outputs: *****
(i)true (ii)false 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Define an enum type, booktype, with the values math,csc
Reference No:- TGS0138701

Expected delivery within 24 Hours