Answer:
There are many string built-in functions which would help us to do numerous operations on the string. A person who can play with strings and Dates are the best programmers.
char[50] sentence = “This is a sentence;
print sentence[sentence.length()-1]; // expected expression
The above piece of get declares a character array and initialized with a sentence. The next sentence obtains the “last index” using “sentence. length() and subtracts 1 to get the last index of the given string and pass it to the character array. So it will print “e” since ‘e’ is the last character in the sentence.