Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with this C++ assignment! RIGHTMOST CHAR CHALLENGE DESCRIPTION: You are given a string 'S' and a character 't'. Print out the position

Please help me with this C++ assignment!

RIGHTMOST CHAR

CHALLENGE DESCRIPTION:

You are given a string 'S' and a character 't'. Print out the position of the rightmost occurrence of 't' (case matters) in 'S' or -1 if there is none. The position to be printed out is zero based.

INPUT SAMPLE:

The first argument will be a path to a filename (e.g. the program was executed with >>> ./a.out input.txt <<<<< ), containing a string and a character, comma delimited, one per line. Ignore all empty lines in the input file. E.g.

Hello World,r Hello CodeEval,E 

OUTPUT SAMPLE:

Print out the zero based position of the character 't' in string 'S', one per line. Do NOT print out empty lines between your output. E.g.

8 10 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions

Question

How would you collect those additional data?

Answered: 1 week ago