+ 6
int function(int* ptr)
//Function to accept an integer pointer.
{
return *ptr;
}
int main()
{
int c = 6;
int * p = &c;
cout<< function(p) <<endl;
// Passing pointer.
cout<< function(&c) <<endl;
//Passing address of original function,
// which can also act as a pointer.
// (After all, this is what is generally
// assigned to a pointer.) .
}