C++ program for call by value
kw.cpp
Output
kodingwindow@kw:~$ g++ kw.cpp
kodingwindow@kw:~$ ./a.out 30 kodingwindow@kw:~$
C++ program for call by reference
kw.cpp
Output
kodingwindow@kw:~$ g++ kw.cpp
kodingwindow@kw:~$ ./a.out a=10 b=20 kodingwindow@kw:~$
What Next?
C++ program to add the members of two different classes using the friend function
C++ program to demonstrate the use of math library functions
C++ program to print the current date and time
Advertisement