answersLogoWhite

0

Display function in de queue

void display()

{

int i;

if((front == -1) (front==rear+1))

printf("\n\nQueue is empty.\n");

else

{

printf("\n\n");

for(i=front; i<=rear; i++)

printf("\t%d",queue[i]);

}

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

Enqueue and dequeue in data structures?

The queue insert operation is known is enqueue. A queue has two ends namely REAR &amp; FRONT. After the data has been inserted in a queue ,the new element becomes REAR.The queue deletion operation is known as dequeue. The data at the front of the queue is removed .


What is the role of data structure in compiler design?

The role of the data structure in compiler designer is to take an input of a program written in another language and produce an output in another language. It also performs error detection.


What are the subject-matters of data structure?

types of data structure types of data structure


What is the difference between a data type and a data structure?

Data type can be regarded as data structure because we can define our own data type by using typed function. Data types are the category in which the variable are listed to hold the specific value and data structures are the way in which the values and variables are stored in the memory. The use of a data type called structures allows a collection of values possibly of different types to be treated as a single item. Each data structure is built up from the basic data types of the underlying programming language using the available data structuring facilities, such as arrays &amp; pointers


Can you give the explanation for various operations in a queue implementation using arrays?

The following are operations performed by queue in data structuresEnqueue (Add operation)Dequeue (Remove operation)Initialize

Related Questions

What is the need of circular queue in data structures?

Circular queue is a linear data structure that follows the First In First Out principle. A re-buffering problem often occurs for each dequeue operation in a standard queue data structure. This is solved by using a circular queue which joins the front and rear ends of a queue.


Example of data program dependency in file system?

-File structure is defined in the program code.


What is data structure in c?

arrang the data in proper order in the program or in the memory is called a data structure, lke arranging the names of diff students in alphabetical order.


Enqueue and dequeue in data structures?

The queue insert operation is known is enqueue. A queue has two ends namely REAR &amp; FRONT. After the data has been inserted in a queue ,the new element becomes REAR.The queue deletion operation is known as dequeue. The data at the front of the queue is removed .


What are the design issue for array?

What is its size? How is its size determined and when (compile/run-time). What does the software using the array do when the array is empty? partially full? full? Avoid the software addressing elements of the array which are undefined, or addressing elements outside the bounds of the array When and who is responsible for allocating and freeing memory when the array is no longer needed (program or called procedure start/termination) or some other time determined during program execution. If the array is implementing a data structure such as a stack, queue, dequeue, list, etc. What is its implementation of the usual data structure operations, Create, Empty, List Items, Top, First, Last, Next, etc.


What is the role of data structure in compiler design?

The role of the data structure in compiler designer is to take an input of a program written in another language and produce an output in another language. It also performs error detection.


What is the difference between enqueue and dequeue?

Inserting element in rear end is called as enqueue, Removing element from the front end is called as dequeue.


Where is the placement of a Copy notation?

In programming, a COPY notation is typically used in COBOL to include the contents of one program or data structure into another. It is placed within the DATA DIVISION or REPORT SECTION of a COBOL program, specifying the source file or data structure to be copied. The placement allows for modularity and reusability of code, making it easier to maintain and manage.


What are the subject-matters of data structure?

types of data structure types of data structure


What is difference between enque and dequeue?

deque


What is the difference between a data type and a data structure?

Data type can be regarded as data structure because we can define our own data type by using typed function. Data types are the category in which the variable are listed to hold the specific value and data structures are the way in which the values and variables are stored in the memory. The use of a data type called structures allows a collection of values possibly of different types to be treated as a single item. Each data structure is built up from the basic data types of the underlying programming language using the available data structuring facilities, such as arrays &amp; pointers


Can you give the explanation for various operations in a queue implementation using arrays?

The following are operations performed by queue in data structuresEnqueue (Add operation)Dequeue (Remove operation)Initialize