Call-by-value — Study Resources & PYQs
Method of passing a copy of an argument's value to a function.
- Estimated study time: 30 minutes
Study resources
- C Pass Addresses and Pointers - Programiz (Article) — C only truly has call by value; call by reference is simulated by passing an address. This page shows the swap-two-numbers example both ways, which is the standard exam question.
- C Recursion - GeeksforGeeks (Article) — Explains base case and recursive case, then shows the call stack building up and unwinding with printed stack-frame messages. The stack-frame trace is what makes recursion finally make sense.
- Pass by Value vs Pass by Reference in C (GeeksforGeeks) (Article) — Side-by-side comparison of call-by-value and call-by-reference with a classic 'swap two numbers' example demonstrating the difference in behaviour.
Taught in these subjects
- COMPUTER PROGRAMMING — CST3101 · Government College of Engineering and Technology, Jammu
- FUNDAMENTALS OF PROGRAMMING USING C — CST3201 · Government College of Engineering and Technology, Jammu
- COMPUTER PROGRAMMING — CST3101 · Government College of Engineering and Technology, Jammu