array/Quexetor.cpp
struct Queue* createQueue(unsigned capacity){
  struct Queue* queue = (struct Queue*)malloc(sizeof(struct Queue));
  queue->capacity = capacity;
  queue->front = queue->size = 0;

  queue->rear = capacity - 1;
  queue->array = (int*)malloc(queue->capacity * sizeof(int));

  return queue;
}
// function to create a queue
// of given capacity.
// It initializes size of queue as 0

function to create a queue
of given capacity.
It initializes size of queue as 0
function to create a queue of given capacity . It initializes size of queue as 0
struct Queue* createQueue(unsigned capacity){
  struct Queue* queue = (struct Queue*)malloc(sizeof(struct Queue));
  queue->capacity = capacity;
  queue->front = queue->size = 0;
  queue->rear = capacity - 1;
  queue->array = (int*)malloc(queue->capacity * sizeof(int));
  return queue;
}
struct Queue * createQueue ( unsigned capacity ) { struct Queue * queue = ( struct Queue * ) malloc ( sizeof ( struct Queue ) ) ; queue -> capacity = capacity ; queue -> front = queue -> size = 0 ; queue -> rear = capacity - 1 ; queue -> array = ( int * ) malloc ( queue -> capacity * sizeof ( int ) ) ; return queue ; }
function to create a queue
of given capacity.
function to create a queue of given capacity .