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...

Write a gawk program that uses the cars file (page 629), displays all cars priced at more than $5,000, and sends its output to standard output.

What will be an ideal response?

Computer Science & Information Technology

A logic bomb is a type of time bomb

Indicate whether the statement is true or false

Computer Science & Information Technology

Match the following terms to their meanings:

I. Cell II. Spreadsheet III. Range IV. Workbook V. Worksheet A. An Excel file containing one or more worksheets B. The primary document in Excel to save work with data C. Another name for a worksheet in Excel D. The small box formed by the intersection of a column and row E. Two or more selected cells that can be treated as a single unit

Computer Science & Information Technology

Shapes are ________ by adding text and pictures to them

A) customized B) formatted C) edited D) grouped

Computer Science & Information Technology