answersLogoWhite

0


Best Answer

In order to write a program to convert stack into queue using c language you must be able to identify the proper program. Having a special certification in programing will be beneficial as well to make sure you recognize the proper queues for the programs.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to convert stack into queue using c language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How to write aC program to merge two singly linked list?

write a c program to circular queue


Write a program to display a content of a queue?

This is really dependent how your queue is implemented. Unfortunately, working from the outside of a queue, this is usually impossible without removing all elements from the queue. while !queue.isEmpty() print queue.dequeue()


How do you write a Java program to implement weighted queue using circular doubly linked list?

Add weights to the elements of the queue and use an algorithm to sort the queue every time an element is added.


Why need supplementary variable technique?

To convert the non-Markovain queue into Markovian queue.


Circular queue program?

For the Complete Implementation of Circular Queue Check out www.codeuniverse.tk


How do you use queue to write a sentencs?

Example 1: I am standing in the ATM queue Example 2: Please be in queue


What is hard-disk queue depth?

The queue depth is the amount of outstanding read and/or write requests waiting to access the hard drive. hard-disk queue depth is the time it take a Hard drive in a piece of a electronic device (ex; A Desktop compter) to process a program without freezing or locking up.


What is hard disk queue depth?

The queue depth is the amount of outstanding read and/or write requests waiting to access the hard drive. hard-disk queue depth is the time it take a Hard drive in a piece of a electronic device (ex; A Desktop compter) to process a program without freezing or locking up.


Write a program in c language to reverse elements of a queue?

There are many ways to reverse the order of the elements in a queue. Provided that you have access to the implementation of the queue, it is of course easy to read the elements from the tail end rather than the front end, thus reversing the elements. However, considering the queue as a black box, and assuming the queue only allows for its characteristic operations (removal of head element, addition to tail), the best method to reverse the elements in a queue to engage a stack. You'd remove the elements from the queue (always reading the head of the queue), and push each element onto the stack. When the queue is empty, you reverse that process: pop each element from the stack until it is empty, and add each element in this order to the end of the queue. Your queue will have the exact same elements as in the beginning, but in reverse order. The exact implementation of this in C, or in any other programming language, is trivial, but the exact source code depends on the implementation of queue and stack containers. Following is pseudocode: Queue<Item> reverse (Queue<Item> queue) { Stack<Item> stack; Item item; while (queue.remove(&item)) { stack.push(item); } while(stack.pop(&item)) { queue.add(item); } return queue; }


Write down the function to insert an element into a queue, in which the queue is implemented as an array?

bring the police they will be in que by themselves


Write an algorithm to implement any three operation of a queue?

8798797


What word in the English language has one consonant followed by four vowels?

Queue