So I was reading theory on pointers, specifically pass by reference and in that there was example of swap function. But when we made the sort programs, like the bubble sorting, we probably passed the argument by value and not by reference and the program worked, but according to the theory it ought to have been passed by reference.
The image of the theory is attached below and also the link to the program which i am referring to.