Verified Jobs Live
C++ and C Easy Level ~3 min read

How do a pointer and an array differ in C?

Interactive Practice Mode
Formulate your thoughts or take notes before revealing the model solution.
Model Answer & Deep-Dive Explanation

An array is a contiguous sequence of elements with a defined array type, while a pointer is an object holding an address. In many expressions an array converts to a pointer to its first element, which explains their similar indexing syntax. They are still not interchangeable: sizeof on an actual array measures the whole array, while sizeof on a pointer measures the pointer. Array parameters are adjusted to pointer parameters, so pass the element count separately when needed. Neither ordinary pointer arithmetic nor indexing automatically checks bounds.