What happens when no argument is supplied to flip() function?
a) All alternate bits are flipped in a bitset
b) All bits are flipped to 1 in a bitset
c) All bits are flipped in a bitset
d) First bit is flipped
Q.3.
What happens when only one argument is supplied to flip() function?
a) All bits are flipped in a bitset
b) Bit corresponding to argument bit is flipped
c) All alternate bits are flipped in a bitset
d) First bit is flipped
Q.4.
What will be the output of the following C++ code?
#include <iostream>
#include <bitset>
using namespace std;
int main()
{
bitset<b1(95);
bitset<b2 = b1 << cout<<b}
a) 01110001
b) 11111000
c) 01111111
d) 00001101
Q.5.
What will be the output of the following C++ code?
#include <iostream>
#include <bitset>
using namespace std;
int main()
{
bitset<b1(95);
bitset<b2 = b1 >> cout<<b1<<endl<<b}
a) 00001011
b) 11111000
c) 01111111
d) 00001101
Support mcqgeeks.com by disabling your adblocker.
Please disable the adBlock and continue. Thank you.