ExamVeda
Login
Home
71
How many parameters are there in getline function?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
72
Which of the following relationships is uni-directional?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
73
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
    int a = 10;
    if (a < 15)
    {
        time:
        cout << a;
        goto time;
    }
    break;
    return 0;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
74
Which is used to create a pure virtual function?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
75
What will be the output of the following C++ code?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
    int num = 3;
    string str_bad = "wrong number used";
    try
    {
        if ( num == 1 )
        {       
            throw 5;
        }
        if ( num == 2 )
        {
            throw 1.1f;
        }
        if ( num != 1 || num != 2 )
        {    
            throw str_bad;
        }
    }
    catch (int a)
    {
        cout << "Exception is: " << a << endl;
    }
    catch (float b)
    {
        cout << "Exception is: " << b << endl;
    }
    catch (...)
    {
        cout  << str_bad << endl;
    }
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
76
Which of the following function is used to insert an element at the end of a vector?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
77
What are the tuples in C++?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
78
How many ways of reusing are there in the class hierarchy?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
79
Which header file is used for the numeric limits in C++?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
80
What will be the output of the following C++ code?
#include <iostream>
#include <string>
#include <tuple>
using namespace std;
int main()
{
	tuple <int, char, string> tp1;
	tuple <int, char, string> tp2;
	tp1 = make_tuple(6, 'a', "Hello");
	tp2 = make_tuple(9, 'z', "World");
	cout<<"("<<get<0>(tp1)<<", "<<get<1>(tp1)<<", "<<get<2>(tp1)<<")"<<endl;
	cout<<"("<<get<0>(tp2)<<", "<<get<1>(tp2)<<", "<<get<2>(tp2)<<")"<<endl;
	tp1.swap(tp2);
	cout<<"("<<get<0>(tp1)<<", "<<get<1>(tp1)<<", "<<get<2>(tp1)<<")"<<endl;
	cout<<"("<<get<0>(tp2)<<", "<<get<1>(tp2)<<", "<<get<2>(tp2)<<")"<<endl;
	return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board