Advertisement

64 Double Pointers As Function Parameter

64 Double Pointers As Function Parameter 1-Passing a double pointer as a function parameter means that we will pass a pointer that has a value of another pointer that points to a data type like integer of float.
2- Steps for passing a pointer to a pointer to integer will be like the following:
A-Define a function that takes a double pointer .
B-In the main declare a variable and a pointer that holds the address of this variable .
C- Pass the address of the pointer as a function parameter.
D-Deference the double pointer, the pointer to variable and the address of the variable.
E-Print out the address of the pointer and the value of the double pointer to see that we have passed the address of the pointer to integer.

Parameter

Post a Comment

0 Comments