#include int fQ[10],frames[10],pages[50],front=-1,rear=-1; int pop(){ int t = fQ[rear]; rear=(rear+1)%10; return t; } void push(int n){ if(rear==-1){ rear=0; } front=(front+1)%10; fQ[front]=n; } int main(){ int i,j,nf,np,fPos,flag; printf("Enter the number of pages : "); scanf("%d",&np); printf("Enter the reference string : "); for(i=0;i