61. How many parameters does a operator() in a function object shoud take?
62. 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<<"Norm is: "<<norm(cn)<<endl;
return 0;
}
#include <iostream>
#include <complex>
using namespace std;
int main()
{
complex <double> cn(3.0, 4.0);
cout<<"Norm is: "<<norm(cn)<<endl;
return 0;
}
63. What will be the output of the following C++ code?
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
cout << RAND_MAX << endl;
}
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
cout << RAND_MAX << endl;
}
64. Which of the following is correct about remove_all_extents() function?
65. What is the use of includes function in c++?
66. What will be the output of the following C++ code?
#include <iostream>
#include <cctype>
using namespace std;
int main(int argc, char const *argv[])
{
char arr[12] = "H3ll0\tW0r1d";
for(int i=0;i<12;i++)
{
cout<<(bool)iscntrl(arr[i]);
}
}
#include <iostream>
#include <cctype>
using namespace std;
int main(int argc, char const *argv[])
{
char arr[12] = "H3ll0\tW0r1d";
for(int i=0;i<12;i++)
{
cout<<(bool)iscntrl(arr[i]);
}
}
67. What will be the output of the following C++ code?
#include <iostream>
#include <functional>
#include <algorithm>
using namespace std;
int main ()
{
int numbers[] = {10, -20, -30, 40, -50};
int cx;
cx = count_if ( numbers, numbers + 5, bind2nd(less<int>(), 0) );
cout << cx;
return 0;
}
#include <iostream>
#include <functional>
#include <algorithm>
using namespace std;
int main ()
{
int numbers[] = {10, -20, -30, 40, -50};
int cx;
cx = count_if ( numbers, numbers + 5, bind2nd(less<int>(), 0) );
cout << cx;
return 0;
}
68. What will be the output of the following C++ code?
#include <iostream>
#include <bitset>
using namespace std;
int main()
{
bitset<8> b1(95);
bitset<8> b2(46);
cout<<(b1^b2);
}
#include <iostream>
#include <bitset>
using namespace std;
int main()
{
bitset<8> b1(95);
bitset<8> b2(46);
cout<<(b1^b2);
}
69. If i1 is Input Iterator and i2 is Output Iterator, then which of the following things are correct?
i) cout<<*i1;
ii) i2 can be used with == operator
iii) *i1 = 1
iv) i2--
i) cout<<*i1;
ii) i2 can be used with == operator
iii) *i1 = 1
iv) i2--
70. Identify the incorrect statement.
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 5
- C plus plus miscellaneous - Section 6
- C plus plus miscellaneous - Section 7
- C plus plus miscellaneous - Section 8
- C plus plus miscellaneous - Section 9
- C plus plus miscellaneous - Section 10
- C plus plus miscellaneous - Section 11