Which of the following is a container class in the Standard
Solution
QUESTION 7) which of the following is a container class in Standard Template Library?
Answer) List
Vector
containers are categorized in to three types
1)Sequence containers : Vector, dequeue, List are comes under Sequence containers
2) Associative containers : set , multiset , map , multimap are comes under Associative containers
3) Derived containers : stack , queue , priority_queue are comes under Derived containers
QUESTION 8)
class base {
public:
virtual void vfunc()
{
cout << \" This is base\'s vfunc(). \"<<endl;
}
};
class derived1 : public base {
public:
void vfunc() {
cout << \" This is derived1\'s vfunc(). \"<<endl;
}
};
int main()
{
base *p , b;
derived1 d1;
p = &b;
p -> vfunc();
p = &d1;
p -> vfunc();
}
Output: The output for above program is
This is base\'s vfunc().
This is derived1\'s vfunc().
