livemcqs.com livemcqs.com 500+ Arrays Types MCQs with FREE PDF 1. Which of the following bitwise operator will you use to invert all the bits in a bit array? a) OR b) NOT c) XOR d) NAND Answer: NOT 2. Which class in Java can be used to represent bit array? a) BitSet b) BitVector c) BitArray d) BitStream Answer: BitSet 3. What is a bit array? a) Data structure for representing arrays of records b) Data structure that compactly stores bits c) An array in which most of the elements have the same value d) Array in which elements are not present in continuous locations Answer: Data structure that compactly stores bits 4. Which of the following bitwise operations will you use to set a particular bit to 1? a) OR b) AND c) XOR d) NOR Answer: OR 5. Which of the following bitwise operations will you use to set a particular bit to 0? a) OR b) AND c) XOR d) NAND Answer: AND
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
livemcqs.com
livemcqs.com
500+ Arrays Types MCQs with FREE PDF
1. Which of the following bitwise operator will you use to invert all the bits in a bit array?
a) OR
b) NOT
c) XOR
d) NAND
Answer: NOT
2. Which class in Java can be used to represent bit array?
a) BitSet
b) BitVector
c) BitArray
d) BitStream
Answer: BitSet
3. What is a bit array?
a) Data structure for representing arrays of records
b) Data structure that compactly stores bits
c) An array in which most of the elements have the same value
d) Array in which elements are not present in continuous locations
Answer: Data structure that compactly stores bits
4. Which of the following bitwise operations will you use to set a particular bit to 1?
a) OR
b) AND
c) XOR
d) NOR
Answer: OR
5. Which of the following bitwise operations will you use to set a particular bit to 0?
a) OR
b) AND
c) XOR
d) NAND
Answer: AND
livemcqs.com
livemcqs.com
6. Which of the following bitwise operations will you use to toggle a particular bit?
a) OR
b) AND
c) XOR
d) NOT
Answer: XOR
7. Which of the following is not an advantage of bit array?
a) Exploit bit level parallelism
b) Maximal use of data cache
c) Can be stored and manipulated in the register set for long periods of time
d) Accessing Individual Elements is easy
Answer: Accessing Individual Elements is easy
8. Which of the following is not a disadvantage of bit array?
a) Without compression, they might become sparse
b) Accessing individual bits is expensive
c) Compressing bit array to byte/word array, the machine also has to support byte/word addressing
d) Storing and Manipulating in the register set for long periods of time
Answer: Storing and Manipulating in the register set for long periods of time
50+ Bit Array MCQs and answer with FREE PDF
9. What is a dynamic array?
a) A variable size data structure
b) An array which is created at runtime
c) The memory to the array is allocated at runtime
d) An array which is reallocated everytime whenever new elements have to be added
Answer: A variable size data structure
10. What is meant by physical size in a dynamic array?
a) The size allocated to elements
b) The size extended to add new elements
c) The size of the underlying array at the back-end
d) The size visible to users
Answer: The size of the underlying array at the back-end
11. The number of items used by the dynamic array contents is its __________