Simulate a real-life Queue System

In places like a bank counter or a ticket counter, customers wait in line to be served in the order they arrive this is a perfect example of a linear queue following FIFO (First In, First Out).

What your program should do

  • Add customers to the queue (enqueue) when they arrive.
  • Serve (dequeue) the customer at the front when it’s their turn.
  • Show the current queue (list of waiting customers).
  • Handle cases when the queue is empty (no one to serve) or full (if using a fixed-size array).

Example scenario

  1. Customer A arrives → added to the queue.
  2. Customer B arrives → added to the rear.
  3. Customer C arrives → added to the rear.
  4. Serve a customer → Customer A is served (front of the queue).
  5. Serve the next → Customer B is served.

Data you can track

  • Customer name or number (e.g., "Customer A", "Customer B").
  • Arrival time (optional, but adds realism).
  • Queue size or maximum capacity (if you want to limit the queue).
Input