81. What is the full form of vtable?
82. What will be the output of the following C++ code?
#include <iostream>
#include <limits>
using namespace std;
int main ()
{
cout << boolalpha;
cout << numeric_limits<int> :: has_infinity << '\n';
return 0;
}
#include <iostream>
#include <limits>
using namespace std;
int main ()
{
cout << boolalpha;
cout << numeric_limits<int> :: has_infinity << '\n';
return 0;
}83. To use external linkage we have to use which keyword?
84. What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int add(int a, int b);
int main()
{
int i = 5, j = 6;
cout << add(i, j) << endl;
return 0;
}
int add(int a, int b )
{
int sum = a + b;
a = 7;
return a + b;
}
#include <iostream>
using namespace std;
int add(int a, int b);
int main()
{
int i = 5, j = 6;
cout << add(i, j) << endl;
return 0;
}
int add(int a, int b )
{
int sum = a + b;
a = 7;
return a + b;
}85. What will be the output of the following C++ code?
#include <iostream>
#include <Valarray>
using namespace std;
int main()
{
Valarray<int> varr = { 1, 2, 3, 4, 5 };
for (int &x: varr) cout << x << " ";
cout<<endl;
varr = varr.shift(-3);
for (int &x: varr) cout << x << " ";
return 0;
}
#include <iostream>
#include <Valarray>
using namespace std;
int main()
{
Valarray<int> varr = { 1, 2, 3, 4, 5 };
for (int &x: varr) cout << x << " ";
cout<<endl;
varr = varr.shift(-3);
for (int &x: varr) cout << x << " ";
return 0;
}86. What is the validity of template parameters?
87. What are the two advantage of function objects than the function call?
88. What will be the output of the following C++ code?
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> v;
for (int i = 1; i <= 5; i++)
v.push_back(i);
int *pos = v.data();
cout<<*(pos + 3);
return 0;
}
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> v;
for (int i = 1; i <= 5; i++)
v.push_back(i);
int *pos = v.data();
cout<<*(pos + 3);
return 0;
}89. Which header file is used with input and output operations of C in C++?
90. What is the property of partial sort function provided by the STL algorithm?
Read More Section(C plus plus miscellaneous)
Each Section contains maximum 100 MCQs question on C plus plus miscellaneous. To get more questions visit other sections.
- C plus plus miscellaneous - Section 1
- C plus plus miscellaneous - Section 2
- C plus plus miscellaneous - Section 3
- C plus plus miscellaneous - Section 4
- C plus plus miscellaneous - Section 5
- C plus plus miscellaneous - Section 6
- C plus plus miscellaneous - Section 8
- C plus plus miscellaneous - Section 9
- C plus plus miscellaneous - Section 10
- C plus plus miscellaneous - Section 11
