Question
What is template? Write appropriate statements to create a template class for queue data structure in c++
Answer :
Word Count : 70
___ _____ ______ ______ ________ ________ __________.
________ ___ ____ ____ ______.
____ ___ __________ _____ _____ _______ ______ _______ ________ __________ _________.
_________ _____ __________ _____ _____ __________ ___ ___ ___ _____ __________ _________.
_____ ________ _____ ________ __________.
___ __________ _____ _________ _____ __________.
Skip in 10
#Include<iostream.h>
#include<conio.h>
template<class t>
class queue
{
t arr[max];
t front,rear;
void add();
void delete();
queue()
{
rear=front=-1
}
};
void queue::add(t n);
{
________ ___ ____ ____ ______.
____ ___ __________ _____ _____ _______ ______ _______ ________ __________ _________.
_________ _____ __________ _____ _____ __________ ___ ___ ___ _____ __________ _________.
_____ ________ _____ ________ __________.
___ __________ _____ _________ _____ __________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.