The necessary condition to be checked before deletion from the queue is
2023
The necessary condition to be checked before deletion from the queue is
- A.
Front value
- B.
Underflow
- C.
Overflow
- D.
More than one of the above
- E.
None of the above
Attempted by 972 students.
Show answer & explanation
Correct answer: B
Before deleting an element from a queue, the necessary condition to check is whether the queue is empty. This is known as underflow. If the queue is empty, deletion cannot occur, and attempting it would result in an error. Therefore, underflow must be checked to ensure the queue has elements before deletion.
हिन्दी उत्तर: क्यू से एलिमेंट हटाने से पहले, यह जाँचना आवश्यक होता है कि क्या क्यू खाली है। इसे अंडरफ्लो कहा जाता है। यदि क्यू खाली है, तो हटाना संभव नहीं है, और ऐसा करने पर त्रुटि होगी। इसलिए, डिलीशन से पहले अंडरफ्लो की जाँच करना आवश्यक है।