Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What happens when no argument is supplied to flip() function?
c Explanation: When no argument is supplied to flip() function i.e. function is called with empty parameters then all the bits of the bitset variable is flipped.
c
See lessExplanation: When no argument is supplied to flip() function i.e. function is called with empty parameters then all the bits of the bitset variable is flipped.
What is the use of the flip function in bitset?
a Explanation: header provides the flip() function to flip bit(s) in a bitset variable i.e. change the bits in a bitset for example 1100 on flipping becomes 0011.
a
See lessExplanation: header provides the flip() function to flip bit(s) in a bitset variable i.e. change the bits in a bitset for example 1100 on flipping becomes 0011.
What happens when only one argument is supplied to reset() function?
a Explanation: When only one argument is supplied to reset() function then bit corresponding to that index is set to 0.
a
See lessExplanation: When only one argument is supplied to reset() function then bit corresponding to that index is set to 0.
What happens when no argument is supplied to set() function?
b Explanation: When only one argument is supplied to set() function then bit corresponding to that index is set to 1.
b
See lessExplanation: When only one argument is supplied to set() function then bit corresponding to that index is set to 1.
What is the use of the set() function in bitset?
b Explanation: header provides the any() function which returns true if none of the bit is set to 1 in the bitset variable.
b
See lessExplanation: header provides the any() function which returns true if none of the bit is set to 1 in the bitset variable.
Which of the following is correct about none() function in bitset?
d Explanation: header provides the set() function to set bit(s) to 1 in a bitset variable.
d
See lessExplanation: header provides the set() function to set bit(s) to 1 in a bitset variable.
Which of the following is correct about any() function in bitset?
c Explanation: header provides the any() function which returns true if any of the bit is set to 1 in the bitset variable.
c
See lessExplanation: header provides the any() function which returns true if any of the bit is set to 1 in the bitset variable.
What does size() function returns?
c Explanation: header provides the size() function to count the number of bits used by the bitset variable. For example, if bitset variable is 1010 then size() function returns 4.
c
See lessExplanation: header provides the size() function to count the number of bits used by the bitset variable. For example, if bitset variable is 1010 then size() function returns 4.
What is the use of count() function in bitset?
b Explanation: header provides the count() function to count the number of 1’s or high bits in the bitset variable.
b
See lessExplanation: header provides the count() function to count the number of 1’s or high bits in the bitset variable.
Indexing of bitset variables starts from ___________
b Explanation: The indexing of bitset variable starts from rightmost bit i.e. if you have b = 1100 as your bitset then b[0] = 0, not 1.
b
See lessExplanation: The indexing of bitset variable starts from rightmost bit i.e. if you have b = 1100 as your bitset then b[0] = 0, not 1.