ExamVeda
Login
Home
21
Which container can have the same keys?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
22
What is the use of no linkage?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
23
What will be the output of the following C++ code?
#include <iostream>
#include <map>
using namespace std;
int main ()
{
    map<char, int> mymap;
    map<char, int> :: iterator it;
    mymap['b'] = 100;
    mymap['a'] = 200;
    mymap['c'] = 300;
    for (map<char, int> :: iterator it = mymap.begin(); it != mymap.end(); ++it)
        cout << it -> first << " => " << it -> second << '\n';
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
24
Pick out the correct objects about the instantiation of output stream.
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
25
Which keyword is used for the template?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
26
What will be the output of the following C++ code?
#include <iostream>
#include <deque> 
using namespace std;
int main ()
{
    unsigned int i;
    deque<int> mydeque;
    deque<int> :: iterator it;
    mydeque.push_back ( 100 );
    mydeque.push_back ( 200 );
    mydeque.push_back ( 300 );
    for (it = mydeque.begin(); it != mydeque.end(); ++it)
        mydeque.clear();
    cout << ' ' << *it;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
27
What will be the output of the following C++ code?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
bool myfunction (int i,int j) 
{
    return (i < j);
}
int main () 
{
    int myints[] = {9, 8, 7, 6};
    vector<int> myvector (myints, myints + 4);
    partial_sort (myvector.begin(), myvector.begin() + 2, myvector.end());
    partial_sort (myvector.begin(), myvector.begin() + 2, myvector.end(),
    myfunction);
    for (vector<int> :: iterator it = myvector.begin(); it != myvector.end(); ++it)
        cout << ' ' << *it;
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
28
What will be the output of the following C++ code?
#include <iostream>
#include <complex>
using namespace std;
int main()
{
	complex <double> cn(3.0, 4.0);
	cout<<sin(cn)<<endl;
	return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
29
Which of the following gives the name of the program if the second parameter to the main fucntion is char **argv?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
30
What will be the output of the following C++ code?
#include <iostream> 
#include <limits>
using namespace std;
int main( )
{
    cout << numeric_limits<float> :: digits10 << endl;
    cout << numeric_limits<double> :: digits10 << endl;
    float f = 99999999;
    cout.precision ( 10 );
    cout << f << endl;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board