C Program: Array Summation Using Pointers

This program reads N integers into a dynamically allocated array and computes their sum using pointer arithmetic instead of array subscript notation. Understanding the equivalence between *(a + i) and a[i] is fundamental to C — both produce identical machine code. The program also demonstrates malloc() and free() for runtime-sized arrays. The original post used …