8.) What is the difference between select() & poll()?

  1. a) select() and poll() have no differences

  2. b) poll() is event driven while select() is not

  3. c) select() is event driven while poll() is not

  4. d) None


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) select() and poll() have no differences - This option is incorrect because select() and poll() do have differences.

Option B) poll() is event-driven while select() is not - This option is correct. The main difference between select() and poll() lies in their behavior. poll() is event-driven, meaning that it only checks for events when explicitly called. It does not block the execution of the program. On the other hand, select() is not event-driven and blocks the program's execution until an event occurs.

Option C) select() is event-driven while poll() is not - This option is incorrect. The correct statement is the opposite: poll() is event-driven while select() is not.

Option D) None - This option is incorrect because there are differences between select() and poll().

The correct answer is B) poll() is event-driven while select() is not.

Find more quizzes: