100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSC 102 Exam 2 |Questions with 100% Correct Answers $12.49   Add to cart

Exam (elaborations)

CSC 102 Exam 2 |Questions with 100% Correct Answers

 0 view  0 purchase
  • Course
  • CSC 102
  • Institution
  • CSC 102

CSC 102 Exam 2 |Questions with 100% Correct Answers

Preview 2 out of 8  pages

  • October 30, 2024
  • 8
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSC 102
  • CSC 102
avatar-seller
Examsplug
CSC 102 Exam 2 |Questions with 100%
Correct Answers
if the leftmost operand of the class in question is of a different type, the overloading function
must be a ____ (___) of the class. - ✔ ✔ nonmember... friend



if the overloading function for op is a member of opOverClass, then when applying op on objects
of type opOverClass, the leftmost operand must be of the type ___ - ✔ ✔ opOverClass



operators can be overloaded as either a ___ or a ___ - ✔ ✔ member function or a friend



syntax for overloading operators in function heading... actual function declaration has.. - ✔
✔ returnType operator#(const className& otherObject) const... two parameters.. 5777



insertion and extraction operator overloading must be declared as ___ functions. because
the two operands of these operators are not - ✔ ✔ friend... of the same type



if the overloading function of the unary operator is a member of the class, - ✔ ✔ it has
no parameters



if the operator function is a nonmember.. the unary overloading class - ✔ ✔ has one parameter



pre-increment operator as a member function - ✔ ✔ className operator++()



as a nonmember function - ✔ ✔ friend className operator++(className&)



post increment - ✔ ✔ className className::operator++(int u)

, the binary arithmetic operator is overloaded as - ✔ ✔ either a friend or member



as a member function + needs - ✔ ✔ only one object as a parameter



passing a parameter to a function takes effect - ✔ ✔ at run time



passing a parameter to a class template takes effect at - ✔ ✔ compile time



cannot compile __ independently of the ___ - ✔ ✔ implementation file independently of
the client code



is the statement int* p; equivalent to int *p; or int * p; - ✔ ✔ yes



in the stament int* p, q; both are pointers t/f - ✔ ✔ false



this is valid int *p, *q; - ✔ ✔ yes



* refers to the ___ to which its ___ points - ✔ ✔ object... operand



can you make a pointer that points to an object of another type like a struct - ✔ ✔ yes



dot operator has a ___ precedence than dereferencing operator... solve this - ✔ ✔ higher...

(*studentPtr).gpa = 3.9;



member access operator also in another form - ✔ ✔ ->

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

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

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

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76799 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$12.49
  • (0)
  Add to cart