How many parameters can the minmax function take?
Which of the following is not a relational operator?
The library function pow() belongs to which header file?
Which of the following is not a fundamental type is not present in C but present in C++?
Which of the following functions is used to insert an element at the end of a vector?
What will be the output of the following code?
int main()
{
extern int i;
i = 20;
printf("%d", sizeof(i));
return 0;
}
What is the meaning of upcasting in object-oriented programming?
Which of the following are examples of compile-time polymorphism in C++?
What will be the output of the following C++ code?
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
cout << min(2, 1) << ' ';
cout << min('m', 'm') << '\n';
return 0;
}
What will be the output of the following C++ code?
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> v1;
vector<char> v2;
for (int i = 1; i <= 5; i++)
v1.push_back(i);
for (int i = 6; i <= 10; i++)
v2.push_back(static_cast<char>(i));
v1.swap(v2);
for(int i=0; i<v1.size(); i++)
cout << v1[i] << " ";
for(int i=0; i<v2.size(); i++)
cout << v2[i] << " ";
cout << endl;
return 0;
}