Differentiate between declaration and definition.



Differentiate between declaration and definition...

Answer / Magan Singh

Declaration in C++ is a statement that tells the compiler about the existence of a variable, function, or class. Definition, on the other hand, provides details about the variable, function, or class, such as its type, size, and implementation.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

In which memory a class gets stored(in heap /in stack)? And why??

2 Answers  


What is size of a object of following class? class Foo { public: void foo(){} }

2 Answers   CA,


Write a corrected statement in c++ so that the statement will work properly. if (x = y) x = 2*z;

2 Answers  


What is type of 'this' pointer? Explain when it is get created?

1 Answers  


What is endl c++?

1 Answers  


What does it mean to declare a member variable as static?

1 Answers  


Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

1 Answers  


What does extern mean in a function declaration in c++?

1 Answers  


Explain object slicing in c++?

1 Answers  


Explain overriding.

1 Answers  


Is c++ pass by reference or value?

1 Answers  


What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal

1 Answers  


Categories