Category "pass-by-value"

How to write c++ code to reverse a string without using inbuilt function?

I have write this code. It does not show any error but string is not reversed.please let me know where i have made the mistake? I'm using codeblock to write cod

In C#, when a variable passes through a function/method, will the original variable change?

I am confused by how a function can change a variable passed through it. For example, if I created a variable t = 1, and pass a function by adding 2 to it, insi

What is the time complexity of passing a Vector of size n to another function by passing by value and passing by reference?

void fun(vector<int>vec) { some code } int main() { int n = 5; vector<int>avec(n); fun(avec); } What is the time complexity of passing