Posts

Showing posts from June, 2020

GROUP C : 20. The ticket booking system of Cinemax theater has to be implemented using C++ program. There are 10 rows and 7 seats in each row. Doubly circular linked list has to be maintained to keep track of free seats at rows. Assume some random booking to start with. Use array to store pointers (Head pointer) to each row. On demand a) The list of available seats is to be displayed b) The seats are to be booked c) The booking can be cancelled

#include <iostream> using namespace std;   struct node {       int seatc , seatr ;       string status ;       struct node * next ,* prev ; }*head[10],*last[10];   class ticket { public :       ticket ()       {             for ( int i=1 ; i<=10 ; i++)             {                   head[i]=last[i]=NULL;                   struct node * temp;                   for ( int j=1 ; j<=7 ; j++)         ...