2079 5

BIT102 ยท 2079 ยท 5 marks

Why array and pointer is similar? Write a program to show the similarity between an array and pointer.

Why array and pointer is similar? Write a program to show the similarity between an array and pointer. [5]

C ProgrammingChapter 8: Pointers and Dynamic MemorySimilarity between arrays and pointers

In C, arrays and pointers are closely related because: 1. Array name is a pointer: The name of an array acts as a constant pointer to the first element (base address) of the array. 2. Same memory access: Both arrays and pointers can be used to access memory locations using either subscript notati...