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
what is the 3 types of system development life cycle
Write a c++ program to display pass and fail for three student using static member function
What is the use of oops?
What are the components of marker interface?
Prepare me a program for the animation of train
hi all..i want to know oops concepts clearly can any1 explain??
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
Which is better struts or spring?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What is abstraction example?
What are the data types in oop?
officer say me - i am offered to a smoking , then what can you say
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
Why do we use oop?
What is difference between data abstraction and encapsulation?