Question: Given variables grade, region, and amount, declare and assign the following pointers: character pointer gradePointer is assigned with the address of grade. integer pointer regionPointer

Given variables grade, region, and amount, declare and assign the following pointers:

character pointer gradePointer is assigned with the address of grade.

integer pointer regionPointer is assigned with the address of region.

double pointer amountPointer is assigned with the address of amount.

Ex: If the input is B 3 1000.0, then the output is:

Oil grade: B Region of import: 3 Quantity: 1000.0

#include #include using namespace std;

int main() { char grade; int region; double amount; /* Your code goes here */ cin >> grade; cin >> region; cin >> amount;

cout << "Oil grade: " << *gradePointer << endl; cout << "Region of import: " << *regionPointer << endl; cout << "Quantity: " << fixed << setprecision(1) << *amountPointer << endl;

return 0; }

c++ and please please make it correct

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!