Question: ( 6 0 1 2 7 0 . 4 1 2 0 1 1 4 . q x 3 z q y 7

\(601270.4120114. q x 3 z q y 7\)
Jump to level 1
Complete the function GetLastIndex() that has one string parameter and one character parameter. The function returns the index of the last character in the string that is equal to the character parameter. If no such character is found, the function returns -1.
Ex: If the input is dssbe \( s \), then the output is:
2
```
#include
using namespace std;
int GetLastIndex(string inputString, char x){
/* Your code goes here */
}
int main(){
string inString;
char x;
int result;
cin >> inString;
cin >> x;
```
\ ( 6 0 1 2 7 0 . 4 1 2 0 1 1 4 . q x 3 z q y 7 \

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!