Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C programming language Taylor Swift's Party Guest List Taylor Swift is holding a party to celebrate her new released album Midnight. She invites her friends
C programming language
Taylor Swift's Party Guest List Taylor Swift is holding a party to celebrate her new released album "Midnight". She invites her friends and many celebrities to her party. To make sure the party is exclusive for people who are invited, you're asked by Taylor to make a program to check if all the guests in the party have RSVP. The guest's name is listed in testdata.in. Make a program to read the list and check every guest that arrived. Format Input The first line contains an integer T stating the number of guests in RSVP. next T lines are the guest's RSVP name to be read. The following line contains of an integer N which indicates the number of guests has arrived. The next N lines, contains the name of the guests to be checked by the program. The name consists only 1 word in lowercase and uppercase with no spacing and no special characters (case-sensitive). Format Output Print output in N line consists of an integer X which indicates the guest's number on the list starting from 0 . Print 1 if the guets's name cannot be found in the list, otherwise print at which line number that the guest's name is found. Constraints - 1T100 - 1 TString 20 1N100 - 1 NString 20 Sample Input 1 (testdata.in) Sample Output 1 (standard output) Note: Remember to always print a 6 at the end of the output Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started