Table of Contents
data Keyword - Pointers to Pointers
Definition
As we all know, a pointer is a special variable that does not hold a specific value, but rather the address of a value (or another variable). In the case of a “pointers to pointers” relationship, a pointer is used not to point to the address of another value, but to the address of another pointer.
A pointer to a pointer is written in code as
**(pointer1) = &pointer2;
where *pointer2 points to the address of another value/variable.
References
List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).
- http:“C Pointer to Pointer, Pointer to Functions, Array of Pointers Explained with Examples” http://www.thegeekstuff.com/2012/01/advanced-c-pointers/
- Reference 2
- Reference 3
data Keyword 1 Phase 2
Function Pointers
Definition
Function Pointers are pointers that point to the memory location of a function and can be used to call and pass arguments to said function. This can be used when you might have a few functions and only one of them needs to be called but at the time of writing the program you don't know which one needs to be called.
References
Demonstration
Demonstration of the indicated keyword.
If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:
/* * Sample code block */ #include <stdio.h> int main() { return(0); }