Answer Posted / chandra
to achieve synchronization with the normal languages like c.
for example int a=10,b=30,c;
c = a+b ;
the above operation is possible in c as well as c++.bcos
the variables declared are primitive types.
If u want to do same thing for user defined datatypes, i
can say objects, we have to overload the operators.
For ex:
Assume that u created one class
Class A
and u have created objects
A obj1(10),obj2(30),obj3;
and u want the add 2 objects and result must be stored in
another object.
then u have to overload the operator + for class A.
obj3 = obj1 + obj2 ;
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Is oop better than procedural?
What is the difference between procedural programming and oops?
What is constructor in oop?
hi all..i want to know oops concepts clearly can any1 explain??
can inline function declare in private part of class?
Why is encapsulation used?
What is polymorphism used for?
what are the realtime excercises in C++?
What are the advantages of polymorphism?
i got a backdoor offer in process global,Bangalore..Can i work with it?
What is polymorphism explain its types?
What is oops in simple words?
What is polymorphism programming?
What does <> mean pseudocode?
What is interface in oop?