Explain calling an object's member function(declared
virtual)from its constructor?
Answer / deepak
It will depend on when pointer to vtable is initialised.
generally if constructor is already defined compiler insert
code to initialise virtual table pointer as first statement
inside defined constructor. If vptr is initialised before
calling virtual function then it will be invoked, if vptr is
not initialised then it can crash.
Is This Answer Correct ? | 2 Yes | 1 No |
What is the difference between a type-specific template friend class and a general template friend class?
Explain data encapsulation?
if i want cin 12345678910 and cout abcdefghij. so how can i create the program?. example : if i key in 8910 so the answer is ghij.
Please explain the reference variable in c++?
What is a "RTTI"?
What is atoi?
What is the most useful programming language?
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
what is importance of data sturture in a programming language?
22 Answers L&T, TCS, Wipro,
What is a map in c++?
What is a syntax in c++?
Can we inherit constructor in c++?