/readArrayWithPointer

Printing Array Elements and Addresses using Pointers

Primary LanguageC

README: readArrayWithPointer.c

Table of Contents

Introduction

readArrayWithPointer.c is a simple C program that demonstrates reading and printing array elements using pointers. The program reads 10 integer elements, stores them in an array, and then prints the address and value of each element using pointer arithmetic. Source 1

Usage

  1. Compile the program using a C compiler, such as GCC.
gcc readArrayWithPointer.c -o readArrayWithPointer
  1. Run the compiled program.
./readArrayWithPointer
  1. Follow the prompts to enter 10 integer elements. Source 2