

MCQOPTIONS
Saved Bookmarks
This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your C++ Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
What happens when only one argument is supplied to reset() function? |
A. | Bit corresponding to an argument is set to 0 |
B. | All bits are set to 0 in a bitset |
C. | All alternate bits are set to 0 in a bitset |
D. | First bit is set to 0 |
Answer» B. All bits are set to 0 in a bitset | |
2. |
What happens when no argument is supplied to reset() function? |
A. | All bits are set to 1 in a bitset |
B. | All bits are set to 0 in a bitset |
C. | All alternate bits are set to 0 in a bitset |
D. | First bit is set to 0 |
Answer» C. All alternate bits are set to 0 in a bitset | |
3. |
What is the use of reset function in bitset? |
A. | Used to make alternate bits zero |
B. | Used to make a bit 0 in a bitset |
C. | Used to make all bits 1 |
D. | Used to make a bit(s) 0 in a bitset |
Answer» E. | |
4. |
What happens when only one argument is supplied to set() function? |
A. | All bits are set to 1 in a bitset |
B. | Bit corresponding to an argument is set to 1 |
C. | All alternate bits are set to 1 in a bitset |
D. | First bit is set to 1 |
Answer» C. All alternate bits are set to 1 in a bitset | |
5. |
What happens when no argument is supplied to set() function? |
A. | All alternate bits are set to 1 in a bitset |
B. | All bits are set to 0 in a bitset |
C. | All bits are set to 1 in a bitset |
D. | First bit is set to 1 |
Answer» D. First bit is set to 1 | |
6. |
What is the use of the set() function in bitset? |
A. | Used to make alternate bits zero |
B. | Used to make a bit 0 in a bitset |
C. | Used to make all bits zero |
D. | Used to set bit(s) in a bitset |
Answer» E. | |
7. |
Which of the following is correct about none() function in bitset? |
A. | Returns true if any bits is set 1 |
B. | Returns true if all bits is set 0 |
C. | Returns true if the number of 1's equal to the number of 0's |
D. | Returns true only if all bits are 1 |
Answer» C. Returns true if the number of 1's equal to the number of 0's | |
8. |
Which of the following is correct about any() function in bitset? |
A. | Returns true if the number of 1's equal to the number of 0's |
B. | Returns true if any bit is set 0 |
C. | Returns true if any bit is set 1 |
D. | Returns true only if all bits are 1 |
Answer» D. Returns true only if all bits are 1 | |