
Functions in C++ 333
The value of s is again passed to funB().
The function funB () receives the v
alue of s
by reference. The value of s is received by vari-
able k by reference i.e., variable k is an alias for
variable s and both have the same memory loca-
tion. The vari able k is incremented. Thus, any
change made in reference variable effects the
actual variable. Thus, after execution of funB
() the printed value of s is equal to 5.
The third function, funC() uses conventional C style. Here, address of the variable s is passed to funC().
The formal argument *j is pointer to the actual argument. Thus, any change made through pointer j also ...