#include #include using namespace std; int main() { double list[4]={10.1234, 20.1234, 30.1234, 40.1234}, *p; p = list; //NOTE: list is a constant pointer to list[0] for (int k=0; k<4; k++) { //NOTE: With the use of "fixed" manipulator, // setprecision() sets the number of digits to the right of decimal cout << fixed << setprecision(2) << list[k] << endl; cout << *(p+k) << endl; cout << p[k] << "\n\n"; } return 0; }