There is an easy test to see if a language supports call-by-reference or not:
a = 3
b = 4
swap(a,b)
print a, b # 4 3
C++ can do this, C can't, C# can't (if you think it can, then so can C), Python can't, Java can't. Therefore, all of those but C++ are call-by-value in all cases.Edit: I hasten to add, the swap() function should be implemented "traditionally". i.e.:
def swap(x, y):
temp = x
x = y
y = temp