+ 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.) . }
23rd Oct 2017, 2:58 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar