NCERT Solutions Class 12 Computer Science Chapter 4 Queue

NCERT Solutions Class 12 Computer Science Chapter 4 Queue have been provided below and is also available in Pdf for free download. The NCERT solutions for Class 12 Computer Science have been prepared as per the latest syllabus, NCERT books and examination pattern suggested in Class 12 by CBSE, NCERT and KVS. Questions given in NCERT book for Class 12 Computer Science are an important part of exams for Class 12 Computer Science and if answered properly can help you to get higher marks. Refer to more Chapter-wise answers for NCERT Class 12 Computer Science and also download more latest study material for all subjects. Chapter 4 Queue is an important topic in Class 12, please refer to answers provided below to help you score better in exams

Chapter 4 Queue Class 12 Computer Science NCERT Solutions

Class 12 Computer Science students should refer to the following NCERT questions with answers for Chapter 4 Queue in Class 12. These NCERT Solutions with answers for Class 12 Computer Science will come in exams and help you to score good marks

Chapter 4 Queue NCERT Solutions Class 12 Computer Science

Question : Define member function delque() to perform delete operation on a linked queue where each node has the following structure :
struct node
{
char name[20]
int marks;
node *link;
};
class queue
{
node *front,‘rear;
public :
queue() {front=rear=NULL;
}
void delque ( );
}; 
Answer:

void queue : : delque ()
{
if ( front != NULL)
{
node *Temp = front;
cout << Temp -> name << Temp
->marks;
front = front->link;
delete Temp;
if(front == NULL)
rear = NULL;
}
else
cout << "Queue is empty";
}

Question : Give the necessary declaration of linked’ implemented Queue containing player’s information (as defined in the following definition of Node). Also write a user defined function in C++ to delete one Player’s information from the Queue.
struct node
{
int Player No ;
char PlayerName[20];
Node*Link;
}
Answer:

NODE *QUEUEDEL(Node * front, int val, char val2[ ])
{
Node *temp;
if (front ==NULL) [1]
cout<<"Queue EMPTY";
{
else
{
temp=front ;
temp®PlayerNo=val; [1]
strcpy (temp®PlayerName, val2);
front=front®Link; [1]
delete temp;
}
return (front);
} [1]

Question : Write a function QDELETE ( ) in C++ to perform delete operation on a Linked Queue, which contains Passenger no and Passenger name. Consider the following definition of Node in thecode,
struct node
{
long int Pno;
char Pname [20];
node *Link;
}; 
Answer:

//Function to delete queue elements Node * QUEUE (Node * front, int val, char vail [])

{
Node *temp;
if (front == NULL)
cout <<"Queue Empty";
else
{
temp = front;
temp®Pno=val;
strcpy (temp®Pname, vail);
front = front®Link;
delete temp;
}
return (front);
} [4]

Question : Write a function QINSERT() in C+ + to perform insert operation on a Linked Queue, which contains Client no and Client name. Consider the following definition of NODE in the code of. QINSERT (). 
struct Node
{
long int Cno; // Client No
char Cname [20]; //
Client Name
Node *Next ;
};
Answer:

Function to Insert element
Node * QINSERT (Node *rear, int val),
char val []
{
Node *temp;
temp = new Node;
temp®Cno = val;
strcpy (temp®Cname, val);
temp®NEXT=NULL;
rear®NEXT=temp;
rear=temp;
return (rear);
} [4]

Question : Write a function in C++ to perform Insert operation in a circular Queue containing Layer’s information (represented with the help of an array of structure Player).  
struct Player
{
long PID; //Player ID
char Pname [20];} //Player Name
Player*Link;
}
Answer:

void Insert ( )
{
PLAYER *P = new PLAYER;
cout <<"Enter Player ID & Name";
cin>>P→PID;
gets (P→ Pname);
P®Link=NULL;
if ((fronts = NULL) && (rear == NULL))
{
front = rear = P;
}
else
{
rear®Link = P;
rear = P;
}
} [4]

Question : Write a function in C++ to perform insert operation in a static circular queue containing book’s information (represented with the help of an array of structure BOOK).
struct BOOK
{
long Accno; //Book Accession Number char Title[20]; //Book Title
};
Answer:

struct BOOK
{
long Accno; char Title [20] ;
int front, rear;
}B [10] ;

void insert()
{
if (r e a r = = s i z e - l & & f r o n t = = 0||front== rear+1)
{
cout<<"\n Circular queue is full"; return;
}
else if(rear==-l)
{
rear++;
front++;
}
else if(rear==size-1)
rear=0;
else
{
rear++;
}
cout<<"Enter Title : ” ;
cin>>B[rear] . Title;
cout<<"Enter Accno : ” ;
cin>>B[rear] . Accno;
} [4]

Question : Write a function in C++ to perform insert operation in a dynamic queue containing DVD’s information (represented with the help of an array of structure DVD).
Answer:
/*Function in C++ to perform insert in a dynamic queue is given as*/
struct DVD
{
long No; // DVD Number
char Title[20]; // DVD Title
DVD *Link
};
void insert(struct DVD *start, char data[20] ) ;
{
DVD *q, *temp;
// Dynamic memory has been allocated for a node
temp=(DVD*)malloc(size of (DVD));
temp=Title[20]=data[20] ;
temp"Next=NULL;
if (start = = NULL) /*Element
inserted at end*/
while (q"Next ! = NULL)
q=q.Next;

q.Next = temp;
} [4]

Question : Write the definition of a member function INSERT() for a class QUEUE in C++, to insert a CUSTOMER in a dynamically allocated Queue of items considering the following code which is already written as a part of the program,
struct CUSTOMER
{
int CNO; char CNAME[20];
CUSTOMER *Link;
};
Class QUEUE
{
CUSTOMER *R,*F;
Public:
QUEUE(){R=NULL;F=NULL;}
void INSERT();
void DELETE()
-QUEUE();
}; 
Answer:

void QUEUE : : INSERT ()
{
CUSTOMER*T=New CUSTOMER;
cin>>T>>;
gets(T→CNAME);
//OR cin>>T>>CNAME;
T → LINK = NULL;
if (R==NULL)
{
F=T; R=T;
}
else
{ R → LINK = T; R = T;
}
}

 

More Study Material

NCERT Solutions Class 12 Computer Science Chapter 4 Queue

NCERT Solutions Class 12 Computer Science Chapter 4 Queue is available on our website www.studiestoday.com for free download in Pdf. You can read the solutions to all questions given in your Class 12 Computer Science textbook online or you can easily download them in pdf.

Chapter 4 Queue Class 12 Computer Science NCERT Solutions

The Class 12 Computer Science NCERT Solutions Chapter 4 Queue are designed in a way that will help to improve the overall understanding of students. The answers to each question in Chapter 4 Queue of Computer Science Class 12 has been designed based on the latest syllabus released for the current year. We have also provided detailed explanations for all difficult topics in Chapter 4 Queue Class 12 chapter of Computer Science so that it can be easier for students to understand all answers.

NCERT Solutions Chapter 4 Queue Class 12 Computer Science

Class 12 Computer Science NCERT Solutions Chapter 4 Queue is a really good source using which the students can get more marks in exams. The same questions will be coming in your Class 12 Computer Science exam. Learn the Chapter 4 Queue questions and answers daily to get a higher score. Chapter 4 Queue of your Computer Science textbook has a lot of questions at the end of chapter to test the students understanding of the concepts taught in the chapter. Students have to solve the questions and refer to the step-by-step solutions provided by Computer Science teachers on studiestoday to get better problem-solving skills.

Chapter 4 Queue Class 12 NCERT Solution Computer Science

These solutions of Chapter 4 Queue NCERT Questions given in your textbook for Class 12 Computer Science have been designed to help students understand the difficult topics of Computer Science in an easy manner. These will also help to build a strong foundation in the Computer Science. There is a combination of theoretical and practical questions relating to all chapters in Computer Science to check the overall learning of the students of Class 12.

Class 12 NCERT Solution Computer Science Chapter 4 Queue

NCERT Solutions Class 12 Computer Science Chapter 4 Queue detailed answers are given with the objective of helping students compare their answers with the example. NCERT solutions for Class 12 Computer Science provide a strong foundation for every chapter. They ensure a smooth and easy knowledge of Revision notes for Class 12 Computer Science. As suggested by the HRD ministry, they will perform a major role in JEE. Students can easily download these solutions and use them to prepare for upcoming exams and also go through the Question Papers for Class 12 Computer Science to clarify all doubts

Where can I download latest NCERT Solutions for Class 12 Computer Science Chapter 4 Queue

You can download the NCERT Solutions for Class 12 Computer Science Chapter 4 Queue for latest session from StudiesToday.com

Can I download the NCERT Solutions of Class 12 Computer Science Chapter 4 Queue in Pdf

Yes, you can click on the link above and download NCERT Solutions in PDFs for Class 12 for Computer Science Chapter 4 Queue

Are the Class 12 Computer Science Chapter 4 Queue NCERT Solutions available for the latest session

Yes, the NCERT Solutions issued for Class 12 Computer Science Chapter 4 Queue have been made available here for latest academic session

How can I download the Chapter 4 Queue Class 12 Computer Science NCERT Solutions

You can easily access the links above and download the Chapter 4 Queue Class 12 NCERT Solutions Computer Science for each chapter

Is there any charge for the NCERT Solutions for Class 12 Computer Science Chapter 4 Queue

There is no charge for the NCERT Solutions for Class 12 Computer Science Chapter 4 Queue you can download everything free

How can I improve my scores by reading NCERT Solutions in Class 12 Computer Science Chapter 4 Queue

Regular revision of NCERT Solutions given on studiestoday for Class 12 subject Computer Science Chapter 4 Queue can help you to score better marks in exams

Are there any websites that offer free NCERT solutions for Chapter 4 Queue Class 12 Computer Science

Yes, studiestoday.com provides all latest NCERT Chapter 4 Queue Class 12 Computer Science solutions based on the latest books for the current academic session

Can NCERT solutions for Class 12 Computer Science Chapter 4 Queue be accessed on mobile devices

Yes, studiestoday provides NCERT solutions for Chapter 4 Queue Class 12 Computer Science in mobile-friendly format and can be accessed on smartphones and tablets.

Are NCERT solutions for Class 12 Chapter 4 Queue Computer Science available in multiple languages

Yes, NCERT solutions for Class 12 Chapter 4 Queue Computer Science are available in multiple languages, including English, Hindi