answersLogoWhite

0

Arrays takes consecutive memory space.

So, if you have 5 consecutive memory blocks free which is consecutive, an error will

occur while creating an array which takes more than 5 blocks of memory.

But if you use pointer, then it don't need consecutive memory blocks all the elements can be placed anywhere in memory.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is pointer of pointer?

pointer is the variable that holds the address of another variable


What is the difference between pointer variable and simple variable What are the advantages of pointer variable?

normal variable stores a value of the given datatype where as the pointer variable stores the address of a variable. for example int n=10; int *p; p=&n; here p is a pointer variable and n is a normal variable.p stores the address of n where as n stores an integer value. *p prints the value of n,p prints the address of n.


Define pointer in C?

Pointer is a variable, A variable that stores the address of another variable. Size of a pointer is 2 bytes.


What is pointer why you use pointer?

Pointer is a variable that stores the address of another variable. Since pointer is also akind of variable, thus pointer itself will be stored at a different memory location.


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 a ponters in c-programming?

with the help of pointers we able to store the memory location of any variable. In c the pointer variable is use to store the memory location of any variable. The pointer variable is define as a simple variable but in pointer variable use a special "*" character at the left most side of name of pointer variable. If any variable name have * it means it is a pointer variable it hold the memory location of variable.


What does pointer holds?

A pointer is used for pointing to a variable. It contains the address of the variable to which it points


What is a pointer variable B?

pointer variable B holds base address of B


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.


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 does pointer to pointer finger mean?

yea that's why its called the point FINGER


How many pointers can be used in a c program?

Answergenerally we use simple pointer, void pointer,null pointer, structure pointer. Answerzero or more (unlimited).