answersLogoWhite

0

No.

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Engineering

What does the function counter do and what are its parameters?

There is no builtin function 'counta' in C.


A program for queue ADT by using arrays in c plus plus?

Arrays are not suitable for implementing queues because while they are ideal for adding to the end, the are not ideal for extraction from the beginning. For that you need a deque. Regardless, the STL (standard template library) already provides an efficient queue ADT in std::queue.


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; }


Array implementation of priority queue example program in c plus plus?

yes


Data structure algorithms using C?

array,linklist,queue,stack,tree,graph etc...

Related Questions

What does the function counter do and what are its parameters?

There is no builtin function 'counta' in C.


A program for queue ADT by using arrays in c plus plus?

Arrays are not suitable for implementing queues because while they are ideal for adding to the end, the are not ideal for extraction from the beginning. For that you need a deque. Regardless, the STL (standard template library) already provides an efficient queue ADT in std::queue.


List out atleast 5 real life instances where queue and circular queue operations are being used?

A>People will stand on queue for getting a film tickets. B>In Airport the luggage will be flowing in a queue manner. C>Children will walk into the school in queue. D>Getting into the temple we have to stand in a queue. E>School children will do the prayer with a proper queue.


How does the round robin algorithm work?

There is a Queue of processes that need to work on and each process has it's time requirement to complete,eg:process processor timeA 3B 8C 6D 4if the processor give 1 processor time to each process , then A->B->C->D will run each taking 1 processor time and complete a cycle and each process that is not complete will add to the end of the queue, if a process is completed it will remove from the queue(not enqueueing).This process will continue until all the process are completed and the queue is empty.Above que will work as follows.A->B->C->D->A->B->C->D->A->B->C->D>B->C->D->B->C->B->C->B->B-> Que is emptyin each highlighted position process that complete their process time remove from the queue and therefore the rest are processing according to queue.


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; }


Array implementation of priority queue example program in c plus plus?

yes


What is the android language coding?

The operating system itself consists of Java and C/C++. The applications are written primarily in Java for the builtin Java virtual machine. (Dalvik in Android < 5.0, ART in Android >=5.0)


Is c library a shared library?

Can be -- platform dependent.


When was GNU C Library created?

GNU C Library was created on 2012-03-28.


Data structure algorithms using C?

array,linklist,queue,stack,tree,graph etc...


What is the phone number of the C C Mellor Memorial Library in Pittsburgh?

The phone number of the C C Mellor Memorial Library is: 412-731-0909.


What are the library function in c language?

libray in c++