71. How many components STL has?
72. What will be the output of the following C++ code?
#include <iostream>
#include <exception>
using namespace std;
int main ()
{
try
{
int* myarray= new int[1000];
cout << "Allocated";
}
catch (exception& e)
{
cout << "Standard exception: " << e.what() << endl;
}
return 0;
}
#include <iostream>
#include <exception>
using namespace std;
int main ()
{
try
{
int* myarray= new int[1000];
cout << "Allocated";
}
catch (exception& e)
{
cout << "Standard exception: " << e.what() << endl;
}
return 0;
}
73. What is meant by standard c++ library?
74. How many Container Adaptors are provided by C++?
75. Which of the following mathematical function is overloaded in <complex> and <valarray>?
76. Pick out the correct syntax of the header file that can be used with C++.
77. What will be the output of the following C++ code?
#include <stdio.h>
#include <stdlib.h>
int compareints (const void * a, const void * b)
{
return ( *(int*)a - *(int*)b );
}
int values[] = { 50, 20, 60, 40, 10, 30 };
int main ()
{
int * p;
int key = 40;
qsort(values, 6, sizeof (int), compareints);
p = (int*) bsearch (&key, values, 6, sizeof (int), compareints);
if (p != NULL)
printf ("%d\n",*p);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int compareints (const void * a, const void * b)
{
return ( *(int*)a - *(int*)b );
}
int values[] = { 50, 20, 60, 40, 10, 30 };
int main ()
{
int * p;
int key = 40;
qsort(values, 6, sizeof (int), compareints);
p = (int*) bsearch (&key, values, 6, sizeof (int), compareints);
if (p != NULL)
printf ("%d\n",*p);
return 0;
}
78. With which does the trigonometric functions work with angles in c++?
79. What are the Associative Containers?
80. How many types of Iterators are provided by C++?
Read More Section(Standard Template Library (STL) in C plus plus)
Each Section contains maximum 100 MCQs question on Standard Template Library (STL) in C plus plus. To get more questions visit other sections.