Best Answer

--> Array is a collection of same kind of data.

--> Pointer is a memory location where the data stored in the memory

User Avatar

Wiki User

โˆ™ 2012-10-02 16:01:55
This answer is:
User Avatar
Study guides

Data Science

See all cards
7 Reviews

Add your answer:

Earn +20 pts
Q: What is the difference between array and pointer in C?
Write your answer...
Still have questions?
magnify glass
Related questions

What is the difference between array to pointer and pointer to an array?

There is no such thing as an "array to pointer." What you might be asking is "array of pointers." An array of pointers is just that, an array in which the variables are pointers. In C this would be an array of pointer variables that are each 4 bytes in size. It is declared like this: int *pointers[3]; A pointer to an array is a pointer that points to the whole array. For example, in C if you have int numbers[5][10]; int (*pointerToArray)[10] = numbers + 2; pointerToArray points to the third element of numbers, which is itself an array.

How do you declare A pointer to array of three chars?

char c[3]; //array of 3 chars char * p; //pointer of type char p=c; //point the pointer to the base of char array

How do you convert from array notation to pointer notation?

In the C and C++ languages the array notation arr[i] is completely equivalent to the pointer notation *(arr + i).

Difference between arrays and pointers in c language?

There is a difference: a pointer is a number that literally points to a place in memory. Arrays are groupings of a type. There is a close relationship between pointers and arrays, however: every expression with arrays (example: array[i]) can be expressed with pointers (example: *(array + i)), because for the computer, an array is just a list of pointers to the type of the array.

What is the base address of an array in c program?

the address of variable (pointer) that contains array

How do you declare a string array and add elements to it in C plus plus?

You cannot add elements to a fixed array in C or C++. If, however, the array is declared as a pointer to an array, you can add elements by allocating a new array, copying/adding elements as needed, reassigning the new array to the pointer, and deallocating the original array.

Give the difference between function and pointer in c?

There is no similarity between the two.

Why array is a implicit pointer?

Arrays are implemented as pointers in c.

What is the difference between array and pointer in C programming?

arrays are the reserved sets of variables, which are supposed to store the similar data. pointers are the special variables which store the address of other variables.

What is the difference between a reference and a pointer in c?

The difference that i learnt very recently and the one i remember :-)Reference cannot be changed whereas pointer value can be changed.Actually, const pointer = reference.

What is the easiest way to pass arrays as argument in c?

the simple and efficient way to pass an array is pointer to an array like that int (*p)[30] ; // pointer to an array of integer having 30 element

What is the difference between character array and integer array in C programming language?

The difference between a character array and an integer array in C (and also in C++) is simply one of size (and, thus, range) of the elements. In C and C++, characters are the smallest integers, usually one byte long. Other than size; chars, short, int, and long are the same fundamental type - integral.

People also asked