Pointer vs Array in C Last Updated : 23 Jul, 2025 Comments Improve Suggest changes 163 Likes Like Report Most of the time, pointer and array accesses can be treated as acting the same, the major exceptions being: 1. the sizeof operator sizeof(array) returns the amount of memory used by all elements in the array sizeof(pointer) only returns the amount of memory used by the pointer variable itself 2. the & operator array is an alias for &array[0] and returns the address of the first element in the array &pointer returns the address of the pointer 3. a string literal initialization of a character array char array[] = “abc” sets the first four elements in array to ‘a’, ‘b’, ‘c’, and ‘\0’ char *pointer = “abc” sets the pointer to the address of the “abc” string (which may be stored in read-only memory and thus unchangeable) 4. Pointer variable can be assigned a value whereas an array variable cannot be. int a[10]; int *p; p=a; /*legal*/ a=p; /*illegal*/ 5. Arithmetic on pointer variable is allowed. p++; /*Legal*/ a++; /*illegal*/ 6. Array is a collection of similar data types while the pointer variable stores the address of another variable.Please refer Difference between pointer and array for more details. Create Quiz Pointers versus Arrays Visit Course Comment K kartik Follow 163 Improve K kartik Follow 163 Improve Article Tags : C Language cpp-array cpp-pointer C-Pointers Explore C BasicsC Language Introduction6 min readIdentifiers in C3 min readKeywords in C2 min readVariables in C4 min readData Types in C3 min readOperators in C8 min readDecision Making in C (if , if..else, Nested if, if-else-if )7 min readLoops in C6 min readFunctions in C5 min readArrays & StringsArrays in C4 min readStrings in C5 min readPointers and StructuresPointers in C7 min readFunction Pointer in C5 min readUnions in C3 min readEnumeration (or enum) in C5 min readStructure Member Alignment, Padding and Data Packing8 min readMemory ManagementMemory Layout of C Programs5 min readDynamic Memory Allocation in C7 min readWhat is Memory Leak? How can we avoid?2 min readFile & Error HandlingFile Handling in C11 min readRead/Write Structure From/to a File in C3 min readError Handling in C8 min readUsing goto for Exception Handling in C4 min readError Handling During File Operations in C5 min readAdvanced ConceptsVariadic Functions in C5 min readSignals in C language5 min readSocket Programming in C8 min read_Generics Keyword in C3 min readMultithreading in C9 min read Like