Explain the difference in the call statement when passing an object’s address (explicitly) versus a reference to function. How are the object’s functions accessed in the called function?

What will be an ideal response?


As with any pointer and reference passing, the pointer call by reference uses the & operator with the object in the call statement. The reference call uses the object name. In the pointer function, we have to use the pointer to the object -> operator to access the public functions. In the reference function, we use the reference object and dot operator. See the Kitty example in the chapter for further reference.

Computer Science & Information Technology

You might also like to view...

A file list is a list of commonly used folders

Indicate whether the statement is true or false

Computer Science & Information Technology

In a bubble sort, the computer goes through the array, comparing each value to the one that follows it.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Designers recommend using ____ of a postcard for a graphic.

A. two-thirds B. one-third C. one-quarter D. three-quarters

Computer Science & Information Technology

Which test case design technique(s) are appropriate for WebApp component-level testing?A) boundary valueB) equivalence partitioningC) path testingD) performance testing

What will be an ideal response?

Computer Science & Information Technology