Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. C Programming Fundamentals

Lesson 14 of 50 · c

Pointer Arithmetic

Duration: 10 mins

When a pointer points to an element of an array, adding or subtracting integers moves it by that many elements, not bytes.

int arr[5] = {10,20,30,40,50};
int *p = arr;        // same as &arr[0]
printf("%d\n", *(p+2)); // -> 30

The compiler automatically scales the offset by sizeof(*p). Pointer arithmetic is only defined within the same array (or one past the last element).

Previous: Pointers – BasicsNext: Arrays