Most of the programs that I saw produced the results in a linear manner , like displaying a normal one-dimensional array.
But here I have a circular queue, and the elements in it must be displayed LIKE a circular queue.
Welcome to Stack Overflow. Please read the About page soon and also visit the links describing How to Ask a Question and How to create a Minimal, Complete, and Verifiable example. Providing the necessary details, including your code, compiler warnings and associated errors, if any, will allow everyone here to help you with your question.
A circular queue generally uses a fixed memory buffer in a circular manner to maintain a linear data list without requiring moving elements or using dynamic memory allocation to accommodate entries entries being added or removed from its ends. Displaying its contents at any point in time from one end to the other would look like a normal one dimensional queue. It sounds like you are dealing with something else, but I don't understand what it is or what you are expecting. Could you explain more? It might be interesting.
Alright, generally we display an array like this - for(i=0; i<size; i++) printf("%d ", Array[i]); This would represent an array as a LINEAR data structure, which fits perfectly with the term 'Linear Queue'. But on the other hand, I'm expecting a block of code, that can display these array elements in a 'Circular' alignment, i.e, just like user253751 said.
for(i=0; i<size; i++)printf("%d ", Array[i]);This would represent an array as a LINEAR data structure, which fits perfectly with the term 'Linear Queue'. But on the other hand, I'm expecting a block of code, that can display these array elements in a 'Circular' alignment, i.e, just like user253751 said.