Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
passing by reference vs passing by value
//Title of this code #include <iostream> using namespace std; int main() { int x = 0, *y = 0, z = 0; cout << "Initial values: x = " << x << " y = " << y << " z = " << z << endl; x = 315; y = &x; z = x; cout << endl << "x = " << x << endl; cout << "y = " << *y << endl; cout << "z = " << z << endl; // change the value of x from 315 to 2; x = 2; cout << "\nx = " << x << endl; cout << "z = " << z << endl; cout << "y = " << *y << endl; }
run
|
edit
|
history
|
help
0
GRAPH DFS & BFS
c++_array_size
is_sorted_30-Seconds-of-C++
Gauss op
Intersected Rectangles
Reverse a string
Shorting in one line using class members std and boost bind
cs
merge without extra space Gap method ALgorithm
k-tree 431 C