Tutorial 23
Tutorial 23
#include <iostream>
using namespace std;
int main() {
double a = 10.7;
double* pa = &a;
double* pb = b;
cout << "Name: a, Address: " << &a << ", Value: " << a << endl;
cout << "Name: pa, Address: " << &pa << ", Points to: " << pa << ", Value: " <<
*pa << endl;
cout << "Name: pb, Address: " << &pb << ", Points to: " << pb << ", Value: " <<
*pb << endl;
cout << "Name: pc, Address: " << &pc << ", Points to: " << pc << ", Value: " <<
*pc << endl;
delete pc;
delete[] pd;
return 0;
}