Vidyalelo
C++ Programming · all questions

Standard Template Library (STL) in C++
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

109

Questions

6/6

Page

Pick an option on a question to see the right answer and solution.

How many Sequence Containers are provided by C++?

Select an option to see the answer and solution.

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
    char* ptr;
    unsigned long int a = (size_t(0) / 3);
    cout << a << endl;
    try
    {
        ptr = new char[size_t(0) / 3];
        delete[ ] ptr;
    }
    catch(bad_alloc &thebadallocation)
    {
        cout << thebadallocation.what() << endl;
    };
    return 0;
}

Select an option to see the answer and solution.

What will be the output of the following C++ code?
#include <stdio.h>
#include <math.h>
int main ()
{
    int param, result;
    int n;
    param = 8.0;
    result = frexp (param , &n);
    printf ("%d \n", param);
    return 0;
}

Select an option to see the answer and solution.

Pick the correct statement.

Select an option to see the answer and solution.

What will be the output of the following C++ code?
#include <stdio.h>
#include <math.h>
int main ()
{
    printf ("%lf", pow (7.0,3));
    return 0;
}

Select an option to see the answer and solution.

How many types of standard exception are there in c++?

Select an option to see the answer and solution.

Where are standard C libraries defined in C++?

Select an option to see the answer and solution.

Which of the following have their changes in their declaration related to constness of parameter?

Select an option to see the answer and solution.

What will be the output of the following C++ code?
#include <stdio.h>
#include <math.h>
int main ()
{
    printf ("%lf", fabs (-10.6) );
    return 0;
}

Select an option to see the answer and solution.