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
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Function Pointers | C Programming Fundamentals lesson | BraveProgrammer
  1. Courses
  2. /
  3. C Programming Fundamentals

Lesson 22 of 50

·c

Function Pointers

11 mins

Course progress44%

What you'll learn

Keep these ideas in mind as you work through the lesson.

4 points
  • Declare: `return_type (*ptr_name)(param_types)`.
  • Assign with the function name **without** parentheses.
  • Call via `(*ptr)(args)` or simply `ptr(args)`.
  • Can be stored in arrays for dispatch tables.

A function pointer stores the address of a function and can be invoked like a regular function.

int add(int a, int b) { return a + b; }
int (*op)(int,int) = add; // pointer to function
printf("%d
", op(2,3)); // prints 5

Useful for callbacks, tables of operations, and implementing polymorphism in C.

Make it stickPractice what you've learned1 quiz · 3 practical tests · Optional activities from C Programming FundamentalsBrowse activities
Previous lessonBitwise OperationsContinue to lesson 23Recursive FunctionsBack to C Programming Fundamentals curriculum