Values & References5 / 18
Up next

Pass by value copies

#include <stdio.h>

void try_double(int n) {
    n *= 2;
}

int main(void) {
    int x = 5;
    try_double(x);
    printf("%d\n", x);
    return 0;
}
What you're solving

the callee gets its own copy