All languages

C

You're viewing a free preview. Sign in free to read every script.

Why this exists The earlier Control Flow and Functions page shows how to write a function. This page answers the questions that come next, and that trip up nearly everyone coming from Python or JavaScript: Why did my…

C Basics: Passing Data to Functions, Function Pointers, qsort and Dispatch Tables

What actually happens when you pass a value to a function (a copy), how pointers let a function change the caller's data, how to return several results, and how function pointers power qsort, bsearch and command tables.

Sign in free to read this script, along with the rest of the library.

Sign in free