OUTPUT :
base CTOR
In main
base DTOR
------------------------------------------------------------------------Q ) Qualifiers availabel in C++ ?
Ans : I always forget mutable , 3 qualifiers are there const ,volatile and mutable .
What is Mutable .
Ans : It specifies that particular member of a structure or class can be altered even if a particular structure variable, class, or class member function is constant.
struct data
{
char name[80] ;
mutable int age ;
}
const data person = { "Amit", 24 }; // Initialisation
strcpy ( person .name, "Sharma"); // compiler error
person.salaray = 2000 ; // Allowed since it is mutable
---------------------------------------------------------------------
Q) What problem does the namespace feature solve ?
http://www.glenmccl.com/ns_comp.htm
person.salaray = 2000 ; // Allowed since it is mutable
---------------------------------------------------------------------
Q) What problem does the namespace feature solve ?
http://www.glenmccl.com/ns_comp.htm
Awesome blog
ReplyDeletec++ interview questions
salesforce interview questions
bootstrap interview questions
spring interview questions and answers for experienced