What is difference between #define and const?
Answer Posted / sarath
#define is the macro,const is modifier forexample const is
used in theb program we can not modify the data
Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
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?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
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
How to hide the base class functionality in Inheritance?
What is difference between inheritance and polymorphism?
What are oops methods?
explain sub-type and sub class? atleast u have differ it into 4 points?
What is persistence in oop?
What is abstraction and encapsulation?
Are polymorphisms mutations?
Explain virtual inheritance?
Why is polymorphism used?
What language is oop?
Why do we use encapsulation in oops?