Best Answer

Double pointers are better known as pointer-to-pointer types. You use pointers to store the memory address of an object but when the object is itself a pointer, you need to use a pointer-to-pointer in instead.

Pointer-to-pointer types are typically used when passing pointers into functions. Pointers allow you to pass objects to functions by reference but the pointer itself is passed by value. If you want to pass the pointer by reference, you need to pass a pointer-to-pointer.

User Avatar

Wiki User

โˆ™ 2015-01-05 20:04:17
This answer is:
User Avatar
Study guides

What is a programming language

What does DOS stand for

What is a software that is distributed for free

What do unix and Linux have in common

See all cards
44 Reviews

Add your answer:

Earn +20 pts
Q: Why you use double pointer instead of pointer?
Write your answer...
Still have questions?
magnify glass
Related questions

What is the use of double pointer?

one is the pointer to apointer where changing it a pointter.

What are the applications of double pointer in c?

insert or delete values both use double pointer

Use of double pointer?

A double pointer has two basic meanings. One is ofa pointer to a pointer, where changing the value ofdouble pointer will result in the original pointer being changed. Another is that of a two-dimentional array, such as a matrix, or a list of char* (e.g. in main when you use argv).

Why you use float pointer instead of integer pointer?

It depends on what type of data you wish to manipulate.

Why is double pointer used?

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;}

What do they use instead of touching the Torah with their fingers?

A silver pointer.

Define pointer to pointer in c?

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;

How to use double pointers in C?

declaration of a double pointer: int **pInt; allocating memory for a double pointer: pInt = malloc(sizeof(*pInt)); *pInt = malloc(sizeof(*pInt));

What do Jews use instead of tooching the Torah to toch the Torah?

A yad "the pointer'

Why do you use double star '' in initializing a variable in class?

The double star (**) notation is not specific to initializing a variable in a class. It is simply a double indirect reference to an object.float myFloat; // an objectfloat *myFloatPtr; // a pointer to an objectfloat **myFloatPtrPtr; // a pointer to a pointer to an objectmyFloat = 123.456; // initialize an objectmyFloatPtr = &myFloat; // initialize a pointer to an objectmyFloatPtrPtr = myFloatPtr; // initialize a pointer to a pointer to an objectmyFloat; // refer to an object*myFloatPtr; // refer to an object through a pointer**myFloatPtrPtr; // refer to an object through a pointer to a pointer*myFloatPtrPtr; // refer to the value of the pointer to the objectDouble pointer notation is used where the caller intends that one of its own pointers need to be modified by a function call, so the address of the pointer, instead of the address of the object, is passed to the function.An example might be the use of a linked list. The caller maintains a pointer to the first node. The caller invokes functions to search, add, and remove. If those operations involve adding or deleting the first node, then the caller's pointer has to change, not the .next pointer in any of the nodes, and you need the address of the pointer to do that.

What are double pointers in C?

There is no such thing as Double pointers in C, except in case you're referring to the declaration such as: double *p; But still, this should better be called as pointer to double. Some people incorrectly call pointer-to-pointer as double pointer. Pointer-to-pointer holds address of another pointer. So it requires double dereferencing to obtain the value object. Example: int **p; This is a declaration of pointer to pointer for int object. A pointer-to-pointer requires two pointer de-references to obtain an objects value. This is often used for linked list manipulation and creating multi-dimensional arrays dynamically. See related links below for some examples:

What do Jews use to touch the Torah instead of their fingers?

A silver pointer called a Yad (hand).

People also asked