Which of the following is a container class in the Standard

Which of the following is a container class in the Standard Template Library? (Select all that apply) sort list vector string Consider the following: What is the output of this program? This is base\'s vfunc() This is derived1\'s vfunc() This is base\'s vfunc() This is base\'s vfunc() This is derived1\'s vfunc() This is derived1\'s vfunc()

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().

 Which of the following is a container class in the Standard Template Library? (Select all that apply) sort list vector string Consider the following: What is t

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site