Pointers ( pointer pointer )
A Pointer is a specific type of variable that holds the address or location of other variable, ( pointer pointer ) structure and functions that are used in a program. Pointer point to these locations by keeping a record of the spot at which they were stored.( pointer pointer ) Pointers to variables are found by recording the address at which a variable is stored. It is always possible to find the address of a piece of storage in C using the special '&' operator. Which feature of C do beginners find most difficult to understand? The answer is easy:pointers.
What is a pointer?
C is a variable that stores/points the address of another variable. C pointer is used to allocate memory dynamically i.e. at run time. To declare and refer to a pointer type variable C provides two special unary operators * and & The pointers variable might be belonging to any of the data type such as Int, float, char, double, short etc.Pointer type variable declaration
A "pointer pointer declaration" names a pointer variable and specifies the type of the object to which the variable points. A variable declared as a pointer holds a memory address.Pointer to a pointer
Since we can have pointers to int, and pointers to char, and pointers to char, and pointers to any structure we've defined, and in fact pointers to any type in C, it shouldn't come as to much of a surprise that we can have pointers to other pointer pointer. if we're used to thinking about simple pointers, and to keeping clear in our minds the distinction between the pointer itself and what is points to, we should be able to think about pointers to pointers, to although we'll now have to distinguish between the pointers, what it pointers to pointers to pointers, or pointers to pointers to pointers to pointers, although these rapidly become too esoteric to have any practical use.)
Very nice
ReplyDelete