CSC102 Final Exam Practice Questions and Answers Updated 2024
1 view 0 purchase
Course
2024/2025
Institution
2024/2025
CSC102 Final Exam Practice Questions
and Answers Updated 2024
Assignment and member selection are the only built-in operations on classes. - Answer-True
Other operators cannot be applied directly to class objects. - Answer-True
What does operator overloading do? - Answer-Extends definition of a...
What is a FRIEND function of a class? - Answer✔✔-a nonmember function of the class that has
access to all members of the class. (Friends have all the benefits of knowing you, but aren't a
family member)
FRIEND is a reserved word. - Answer✔✔-True
In which definition is FRIEND used? - Answer✔✔-Class definition, but not function.
To overload a unary operator for a class: If the operator function is a member of the class, how
many parameters does it have? - Answer✔✔-none
To overload a unary operator for a class: If the operator function is a nonmember, how many
parameters does it have? - Answer✔✔-one
Binary arithmetic operator + can be overloaded either as a member or nonmember function. -
Answer✔✔-True
As a member function, operator + has direct access to data members of one of the objects, so
how many objects need to be passed as a parameter? - Answer✔✔-Only one
As a nonmember function, how many objects must be passed for operator +? - Answer✔✔-Both
The assignment operator copies _______________________ from one object to another.
Doesn't work well with _____________________________. - Answer✔✔-Member variables;
object; pointer member variables
Classes with pointer member variables must.. - Answer✔✔-1. Explicitly overload the assignment
operator
Page 3/22
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Emillect. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.49. You're not tied to anything after your purchase.