Find last index of a character in a string using C++ program
Given a string, and we have to find last index of a character using C program.
Examples:
Enter string: Hello world!
Enter character: o
Last index of 'o' is: 7
Enter string: Hello world!
Enter character: H
Last index of 'H' is: 0
Enter string: Hello world!
Enter character: z
'z' is not found in the string
Consider the program:
Output
need an explanation for this answer? contact us directly to get an explanation for this answer