following is the function that are used to find the difference between the value of front element and rear item.
int diff() { return front->data-rear->data; }