A program that will create a movie seat reservation. The program will display the summary seats and its status. The user will be ask what seat no. to be reserved, then it will go back again to the summary to display the updated seat status. If the seat no. is already reserved then it will prompt an error message. And also if the input seat no is out of range then it will also prompt an error message. The program is continuously running. Termination of the program will depends on how the programmer will apply.
Sample output:
Movie Seats Reservation
Summary of Seats:
Seat 1: Available
Seat 2: Available
Seat 3: Available
Seat 4: Available
Seat 5: Available
Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1
Movie Seats Reservation
Summary of Seats:
Seat 1: Reserve
Seat 2: Available
Seat 3: Available
Seat 4: Available
Seat 5: Available
Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 6
The Seat no. is out of range!
Movie Seats Reservation
Summary of Seats:
Seat 1: Reserve
Seat 2: Available
Seat 3: Available
Seat 4: Available
Seat 5: Available
Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1
The Seat no. is already reserved!
Movie Seats Reservation
Summary of Seats:
Seat 1: Reserve
Seat 2: Available
Seat 3: Available
Seat 4: Available
Seat 5: Available
Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 0
GoodBye... Thank You!!!
No Answer is Posted For this Question
Be the First to Post Answer
# include<stdio.h> aaa() { printf("hi"); } bbb(){ printf("hello"); } ccc(){ printf("bye"); } main() { int (*ptr[3])(); ptr[0]=aaa; ptr[1]=bbb; ptr[2]=ccc; ptr[2](); }
main() { clrscr(); } clrscr();
String copy logic in one line.
Write a program that find and print how many odd numbers in a binary tree
how to swap 3 nos without using temporary variable
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
main() { printf("%d", out); } int out=100;
why the range of an unsigned integer is double almost than the signed integer.
Give a one-line C expression to test whether a number is a power of 2.
main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,