hamburger menu
All Coursesall course arrow
adda247
reward-icon
adda247
    arrow
    arrow
    arrow
    Which of the following operation(s) is/are the basic operation(s) of a queue? (i) Enqueue (ii) Dequeue
    Question

    Which of the following operation(s) is/are the basic operation(s) of a queue?
    (i) Enqueue
    (ii) Dequeue

    A.

    Only (i)

    B.

    Neither (i) nor (ii)

    C.

    Both (i) and (ii)

    D.

    Only (ii)

    Correct option is C

    A queue is a linear data structure that follows the First-In-First-Out (FIFO) principle, meaning the first element added to the queue is the first one to be removed. The two basic operations of a queue are:

    1. Enqueue (i):
      • This operation adds an element to the rear (end) of the queue.
    2. Dequeue (ii):
      • This operation removes an element from the front of the queue.

    These two operations are fundamental for managing data in a queue.

    Important Key Points:

    1. Enqueue Operation:
      • Adds data to the rear of the queue.
      • Example: Adding a person to the end of a line.
    2. Dequeue Operation:
      • Removes data from the front of the queue.
      • Example: Serving the first person in a line.
    3. Queue Characteristics:
      • Follows FIFO (First In, First Out).
      • Commonly used in real-life scenarios like printer queues, task scheduling, and CPU management.

    Knowledge Booster:

    1. Option A: Only (i):
      • Incorrect: Enqueue alone does not fulfill the queue operations without the ability to remove elements.
    2. Option B: Neither (i) nor (ii):
      • Incorrect: Both operations are essential for a queue to function.
    3. Option D: Only (ii):

    Incorrect: Dequeue alone without Enqueue makes the structure meaningless as no elements can be added.

    Free Tests

    Free
    Must Attempt

    Government Policies and Scheme

    languageIcon English
    • pdpQsnIcon10 Questions
    • pdpsheetsIcon20 Marks
    • timerIcon5 Mins
    languageIcon English
    Free
    Must Attempt

    Government Schemes

    languageIcon English
    • pdpQsnIcon10 Questions
    • pdpsheetsIcon20 Marks
    • timerIcon5 Mins
    languageIcon English
    Free
    Must Attempt

    SSC GD PYP (Held on 4 Feb 2025 S1)

    languageIcon English
    • pdpQsnIcon80 Questions
    • pdpsheetsIcon160 Marks
    • timerIcon60 Mins
    languageIcon English
    test-prime-package

    Access ‘UPSSSC’ Mock Tests with

    • 60000+ Mocks and Previous Year Papers
    • Unlimited Re-Attempts
    • Personalised Report Card
    • 500% Refund on Final Selection
    • Largest Community
    students-icon
    368k+ students have already unlocked exclusive benefits with Test Prime!
    Our Plans
    Monthsup-arrow