answersLogoWhite

0


Best Answer

If the element is a pointer, then dereference the element, just as you would dereference any pointer.

User Avatar

Wiki User

โˆ™ 2013-08-13 16:32:10
This answer is:
๐Ÿฆƒ
0
๐Ÿคจ
1
๐Ÿ˜ฎ
0
User Avatar
Study guides

Software and Applications (non-game)

20 cards

What is a programming language

What does DOS stand for

What is a software that is distributed for free

What is application software

โžก๏ธ
See all cards

Software and Applications (non-game)

21 cards

What is a programming language

What does DOS stand for

What is a software that is distributed for free

What is application software

โžก๏ธ
See all cards

Software and Applications (non-game)

23 cards

What is a programming language

What does DOS stand for

What is a software that is distributed for free

What is application software

โžก๏ธ
See all cards

Add your answer:

Earn +20 pts
Q: How do you display the contents of the memory address stored in an element of a pointer array?
Write your answer...
Submit
Related questions

What is an address in C plus plus programming?

An address in C or C++ is the location in memory of an object or function. An address is the contents of a pointer, as opposed to the contents of the memory location pointed to by the pointer.


Function pointers example programs?

A pointer which keeps address of a function is known as function pointer. example: { void *(*ptr)(); ptr= &display; (*ptr)(); return(0); } void display() { .................. )


What is the utility of a header node in a linked list?

The utility of a header node in a linked list is to simplify the functions of adding and deleting elements in the list. If you have a pointer in memory that points to the first element, then you need to pass the address of that pointer, rather than the value of that pointer, to the routines for list manipulation, because that pointer would need to change if an element were added or deleted at the head of the list. If that pointer, however, points to a special element in the list which is actually the pointer to the head of the list, then you do not need to pass the address of the pointer - you can pass its value, and it will never change. This technique "wastes" the data portion of that first element.


Write a C program to display the address and the contents of pointer variable?

int *x,*y; int a=14,b=10; x=&a; y=&b; printf(the variable and address of the variable a is %d", a,*x);


What always contains a pointer variable?

The address of an element values Address as well as value


Why does array index begins with 0 not with 1?

It is because array name implies its address and if you want to access first element of it pointer address logic is as below: Arrays first element address = array base address + 0 Arrays second element address = array base address + 1


What are pointer to pointer?

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.


C program pointers to pointers examples?

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;


How are the members in the linked list liked together?

Usually each member has a pointer storing the address of the next element.


Relation between array and pointer?

Array name is a static pointer to the array.Meaning of static here is that we can not modify the pointer (array name) value to any other value. Array name is the base address of the array in memory. for example if we have array a[5] of float starting at address 1000 in memory then a tells us the base address of array or address of a[0] i.e. 1000. a+1 tells the address of element a[1] and so on. we can access the element of an array by considering the array name as pointer. *(a+2) will access the third element of an array a i.e. a[3]. but we can't achieve it by applying ++ operator 3 times since the array pointer can't be modified.


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;


What is the representation of the third element in an array named a?

The third element of an array named a is represented by a[2]. This is because the third element's address is offset from the start of the array by exactly 2 elements. Note that a and &a are equivalent; the address of a, which is essentially a pointer of the array's type (hence arrays implicitly decay to pointers). When we use an array name or a pointer (other than void*) with the subscript operator [], the compiler automatically dereferences the value at the offset address. That is, assuming a pointer, p, of type T*, the compiler computes the address of p[2] as being p + (2 * sizeof(T)), and returns the (dereferenced) value at that address. Hence pointers and arrays behave identically.


What is pointer of pointer?

pointer is the variable that holds the address of another variable


How is a pointer initialized?

A pointer is initialized by assigning the address of some object to it ... int a; // an integer int *pa; // a pointer pa = &a; // initialize the pointer (*pa); // use the pointer ... by allocating memoryand assigning that address to it ... int *pa; // a pointer to an integer pa = malloc (1 * sizeof(int)); // allocate if (pa == NULL) {... exception processing ...} (*pa); // use the pointer ... or by doing address computation with it ... int a[10]; // an array of integers int *pa; // a pointer to an integer pa = &(a+3); // initialize to the fourth element (*pa); // use the fourth element


What is the structure pointer?

Pointer which stores address of structure is called pointer to structure. Explanation : 1)sptr is pointer to structure address. 2) -> and (*) both represents the same.


Difference between void pointer and null pointer?

A Null pointer has the value 0. void pointer is a generic pointer introduced by ANSI. Before ANSI, char pointers are used as generic pointer. Generic pointer can hold the address of any data type. Pointers point to a memory address, and data can be stored at that address.


What is pointer explain scale factor of a pointer using example?

Pointer is an address (or a variable holding an address). Scale factor is something completely unrelated.


What is void pointer variable?

A void pointer variable is a pointer variable (of some type) that is assigned the value zero, meaning it points to address zero. Memory address zero is a reserved address, which means the pointer variable references nothing in particular.


What does pointer to pointer finger mean?

Pointer is simply a variable that stores the memory address of another variable. Pointer to pointer means double pointer ,pointer that points to another pointer variable.


What is the difference between a pointer and de-reference pointer?

A pointer is an object that contains the address of another object. A deference'ed pointer is an object. It was a pointer, but its address was used to locate and use that other object as if it was the original target of the instruction.


What are near and far pointer in c?

Far and near pointer is only introduced in turbo C compiler.When the pointer refers to an address in the same segment it is called near pointer, but when it refers to an address in another segment it is called far pointer.


In pointers what is the use of pointer variable?

Pointer is a variable that stores the address of another variable . So pointer basically stores the address of another variable and size of pointer can be evaluated by using sizeof operator.


What is void pointer and what are its uses?

Void pointer can hold the address of any kind of pointer. But we can't operate on void pointer


Pointer in c?

A Pointer is a Variable that holds a memory address, usually the location of another variable in memory. A pointer to pointer is known as double pointer.


How are pointer different from other variables?

A pointer type differs from all other types in that it is used specifically for the purpose of storing a memory address and for permitting indirect access to the value stored at that memory address. When we store a memory address, we are said to be pointing at that memory address. When we indirectly access the value stored at that memory address, we are said to be dereferencing the pointer. We can also say that a pointer holds a reference to the object stored at the memory address it points to. Pointers may only store memory addresses where the memory holds a value of the same type as the pointer, or is of a type that is co-variant with the pointer's type. Where the type is unknown we can use a void pointer, however this is best avoided wherever possible. A pointer may be constant or variable. When it is variable, we can assign any appropriate memory address to the pointer at any time. When it is constant, we must assign an address at the point of instantiation and cannot change that address while the pointer is in scope; it must always point at the same memory. Note that the constness of the pointer does not affect the constness of the object being pointed at. However, if the object being pointed at is of a constant type, then the pointer must be a pointer to that constant type, regardless of whether the pointer itself is variable or constant. Thus we can point at a memory address in four different ways: a variable pointer to a variable type; a variable pointer to a constant type; a constant pointer to a variable type and; a constant pointer to a constant type. We define both aspects when we instantiate the pointer.