When you call a function with arguments, C copies each argument's value into a fresh local variable inside the called function. The function operates on the copy, so modifying a parameter inside the function has no effect on the caller's variable. This is the only calling convention C has, there's no "pass by reference" like C++ or Pascal. The consequence is that a function can't change a caller's variable directly. To do that, the caller has to pass a pointer to the variable, and the function modifies what the pointer points to. Pass-by-value isolates functions from their callers, which makes code easier to reason about but means you have to use pointers (or return values) whenever you need to communicate changes outward.
Programming Fundamentals · Interview question
What does "pass by value" mean in C, and what does it not let you do?
A strong answer
What a weak answer sounds like
You know the answer. Do you know what gets you dinged?
Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.
From the lesson
Functions
Naming a chunk of logic so you can call it from many places. Parameters in, return value out, scope rules: the building block of every program.