Difference between over loading and over ridding?
Answers were Sorted based on User's Feedback
Answer / vasanth
Method Overloading is the method name looks similar but
return type and method arguement (inside parameter) differs.
Method Overiding is that the method name, arguements and
return type seems similar on both base and derived class.
(Sometimes we will add the additional code to the derived
class method also).
| Is This Answer Correct ? | 1 Yes | 3 No |
What are the types of abstraction?
what is different between oops and c++
Is html an oop?
What is difference between pop and oop?
Petrol pump mgt. system: To design a program that display an interface for the sale of the Petrol and then make the entries at the backend in the database.
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; wow *b; a.x = 22; b = &a; a.x = 23; cout << b->x; return 0; }
create a class complex having real and imaginary part of a complex no. as a data member. overload the binary operators(+,- and *) to perform the operations on complex no. objects. overload binary operator using friend function.
2 Answers CTS, Delhi University,
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
why the memory allocated with new cant be freed using free()
What is abstraction and encapsulation?
What is oops concept with example?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)