Please solve all the questions In C++ programming ASAP, please make sure the pro
ID: 3762934 • Letter: P
Question
Please solve all the questions In C++ programming ASAP, please make sure the programming questions are correct. Thanks a lot.
1) Consider the following declaration: enum fruitType ( ORANGE, APPLE, BANANA, GRAPE, STRAWBERRY, MANGO, GUAVA, fruitType fruit; Answer the following questions a. What is the value of static castint> (STRAWBERRY)? b. What is the value, if any, of the following ex PINEAPPLE, KINI ing expression? static cast (static castcints (MANGO)- 2) c. What is the value, if any, of the following ex pression static cast (static castExplanation / Answer
1st program
#include <iostream>
using std::ostream;
using std::cout;
using std::cin;
using std::endl;
int main()
{
enum Fruits{orange, guava, apple};
Fruits myFruit;
int i;
cout << "Please enter the fruit of your choice(0 to 2)::";
cin >> i;
switch(i)
{
case orange:
cout << "Your fruit is orange";
break;
case guava:
cout << "Your fruit is guava";
break;
case apple:
cout << "Your fruit is apple";
break;
}
return 0;
}
2nd program
3rd program