Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

5 Challenge Trailing String Programming challenge description: You are given two strings A and B. Print the number 1 if string B occurs at the

image text in transcribed
image text in transcribed
5 Challenge Trailing String Programming challenge description: You are given two strings A and B. Print the number 1 if string B occurs at the end of string A. Otherwise, print the number 0. Input: Your program should read lines of text from standard input. Each line will contain two strings, A and B, separated by a comma. Output: For each input line, print the number 1 if the second string occurs at the end of the first string, or O if it does not, one digit per line. Test 1 Test Input Hello World, World Expected Output Test 2 Test Input Hello HireVue, HireVue Expected Output 1 Test 3 Test Input 6 San Francisco, San Jose Expected Output 0 - Copyright 2017

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions