Though grammatically incorrect, those are actual words used in jargon. And I disagree with jargon being useless, there are usually no words for those concepts in general language, so everytime you talked about it you would have to use some roundabout description to tell people what you are actually talking about. Though you are right, those sound like typical school questions.
Ok, if you really need answers for those...
why static functions aren't used with operator overloading despite they are working with objects or without? |
because static functions exist in the namespace of the class. You would have to write something like
class1::operator+(object1,object2)
if you declared operators as static functions.
member functions for operators aren't called implicitly if the left operand isn't object of this class, can it be called explicitly? |
You can call operators explicitly with
object1.operator+(args)
, but this isn't really achieving anything, is it?
global functions provide commutative services for operators overloaded, HOW? |
Because unlike member operators, with global operators you have control over both, the left hand argument and the right hand argument. Member operators can only take a left hand argument. This is only a problem if the left hand and right hand arguments can have different types though.
Why returning a reference from a function helps in cascading?[/quotes]
Cascading is for example, a = b = c. Here the return value of b=c (which is probably a reference to b) can be assigned to a. It doesn't really make any difference whether you return a reference or a copy though, except maybe that the efficiency on runtime may vary (there are cases in which returning a reference is faster, and there are cases in which returning a copy is faster).
[quote]In this definintion
ClassName &ClassName::functionName(param)
return *this;
why doubling the ClassName when using *this return? |
This means: The function functionName that belongs to the class ClassName returns a reference to a ClassName instance.
Can the copy constructor be used with normal array instead of dynamic allocated array? |
I am sorry, but I do not quite understand this question.
What is the difference between (a=b=c) and (a=b)=c and why the const reference return prevents the second form? |
a=b=c first assigns c to b, and then assigns a to b. (a=b)=c first assigns b to a, and then c to a. If the = operator returns a constant reference this is not possible, because you can't assign anything to a constant.