14 ms·
Question: If you were given a new block of code below, what is the result of X if X is passed by reference? [Block of code] 1. 34 2. 17 3. 43
by kefka 9y ago
Question: If you were given a new block of code below, what is the result of X if X is passed by reference?
[Block of code]
1. 34
2. 17
3. 43
4. 22.5
5. Not listed
____________________
This would be a much more clearer way of handling pass by ref/value. 2 of the answers are correct, so this could be reused to ask the other one. If they're being tricky, they can award half-credit for choosing the wrong pass-by-*. And 3 other answers are junk. And this abstracts out any sort of programming neologims or fetishization of $random_language.