Computer Science, asked by gamersteem7, 7 days ago

Explain the following :

(i) Constructors

(ii) Operator overloading

Answers

Answered by seemag1616
0

Answer:

When a class or struct is created, its constructor is called. Constructors have the same name as the class or struct, and they usually initialize the data members of the new object. In the following example, a class named Taxi is defined by using a simple constructor.

This means C++ has the ability to provide the operators with a special meaning for a data type, this ability is known as operator overloading. For example, we can overload an operator '+' in a class like String so that we can concatenate two strings by just using +

Answered by zeroh4927
0

Answer:

you all

donot jion

fxr-niwq-hjn

girls

bad op

alert all girl

all is well

Similar questions