What is the difference between declaration and definition?

Answer Posted / s

Declaration means we are just creating a variable or method.
Defination means we are assigning some value for a variable
& doing some functions in method

Is This Answer Correct ?    116 Yes 48 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of polymorphism?

568


What is difference between inheritance and polymorphism?

560


What is polymorphism what is it for and how is it used?

570


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

1685


What is overriding vs overloading?

579






What is encapsulation c#?

597


to find out the minimum of two integer number of two different classes using friend function

1635


What is object in oop?

671


What are the types of abstraction?

550


What do you mean by abstraction?

604


Describe these concepts: Polymorphism, Inheritance and Abstraction.

604


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

1570


What is overriding in oop?

544


How to improve object oriented design skills?

565


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1448