What is the time complexity of binary search in a sorted array?

a) O(n)

b) O(log n)

c) O(n^2)

d) O(1)

What is the main function of the ALU (Arithmetic Logic Unit)?

a) Perform calculations and logical operations

b) Manage memory allocation

c) Control input and output devices

d) Store data temporarily

Which of the following is not a type of loop in programming?

a) For loop

b) While loop

c) Do-While loop

d) Repeat-Until loop

Which of the following is the primary function of the operating system?

a) To manage hardware resources

b) To execute programs

c) To provide security

d) All of the above

Which of the following is not a valid data type in programming?

a) Integer

b) Float

c) Boolean

d) Character Array