A pointer stores a relative memory link to a place where a variable's data is stored. This mechanism allows the OS to allocate memory to programs as necessary. It is considered "dangerous" to use pointers, as a single pointer can cause a program to crash, although these are exclusively programmer's error.
the purpose of pointer in c for saving the memory space.,and reduce the length and complexity of the program
Void Pointer is a General purpose pointer ,that does not have any data type associated with it and can store address of any type of variable. Declaration: void * pointer_name;
Like all other mice, the purpose of a serial mouse is to move a cursor or pointer across a computer display.
1. pointer to a constant means you can not change what the pointer points to 2. constant pointer means you can not change the pointer.
Example: int x; -- integer int *px= &x; -- pointer to integer int **ppx= &px; -- pointer to pointer to integer int ***pppx= &ppx; -- pointer to pointer to pointer to integer
A pointer only holds an address information (location) in the memory. if a pointer holds points another pointer then it is a pointer to an other pointer. Pointer holds an address in the memory so in that address there is an other location information that shows another location.
When a pointer variable stores a non-zero memory address, we can use the dereference operator to access the value stored at that address. This is what we mean by dereferencing and is also known as indirection because we can access a value indirectly through a pointer variable. Note that if the stored address is zero, we must not dereference the pointer as the zero address indicates that the pointer is not currently pointing at any object in particular. The zero address is a reserved address so no object can ever be allocated to it.
pointer is the variable that holds the address of another variable
Double pointer is a pointer to a pointer. So you can work with the double pointer as you work with a single one.Or you might mean 'pointer to double', eg:void clear_double (double *dp){*dp = 0;}
Double (**) is used to denote the double pointer. As we know the pointer stores the address of variable, Double pointer stores the address of any pointer variable. Declaration : int **ptr2Ptr;
Pointer to Pointer is a double pointer, denoted by (**). Pointer stores the address of the variable and pointer to pointer stores the address of a pointer variable and syntax can be given as int **ptr2ptr;
Void pointer can hold the address of any kind of pointer. But we can't operate on void pointer