Question: C programming- 23) Illustrating two dimensional array :- Program to enable Seat selection and booking //Set row and column size #define ROWS 20 #define COLS
C programming-
23) Illustrating two dimensional array :-
Program to enable Seat selection and booking
//Set row and column size
#define ROWS 20
#define COLS 6
int main()
{
char seats[ROWS][COLS];
//Initialize every even numbered seat with O(available) and odd numbered seat with X(unavailable) using two nested for loops and all the seats with column number two are aisle seats, you can denote them with A.
//print out the seating list
//check if the passenger wants a window seat or aisle seat
//print out all the available seats (window seat or aisle seat)
//read the seat that the user wants to book
//book the seat (set the seat to X)
//print the new seating list
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
