Computer Science, asked by charitarth4278, 9 months ago

What is the difference between array and pointer?

Answers

Answered by Keya200
0

Answer:

The main difference between array and pointer is that an array is a data structure that stores a collection of elements of the same data type while a pointer is a variable that holds the address of another variable in the computer memory.

Array and pointer are two concepts used in programming languages such as C and C++. An array is a collection of data that holds a fixed number of values of the same data type.  For example, to store the marks of 10 students, the programmer can create an array that can store 10 integers. On the other hand, a pointer is a variable that holds the address of another variable.  Pointers help to access memory and to manipulate memory addresses.

Similar questions