Queue is an array of either single or multiple dimensions declared under basic or user defined data type with normal or pointer type.
Basic Properties :
-Queue content is processed in specific sequence called FIFO(First In First Out).A value which is inserted first can be removed first.
-In order to process queue content two indices are used.First index is a front index,which is used to point prior to first data value present in queue.Second index is rear index,which is used to point for deletion and rear index is used for insetion. Initially both the indices are set to -1.
-Used slots can be reused after deleting data.Once the front and rear are increased,they cn not be decreased.
Basic activities :
1) Insert data :
If rear index points to last slot of queue then
queue is full,no data value can be inserted in queue
increase rear value by one to get next empty slot
read data from console and store it in new rear position.
If front=rear then
queue is empty,no data can be deleted from it
increase curent front value by one
copy a value from current front position into another variable